KLineChart<T> class

K 线图核心组件。

该组件负责横向滚动、缩放、选中、可见区计算和绘制调度。 具体的网格、蜡烛、指标、覆盖层和选中详情都交给 delegate 实现, 因此业务方可以在不修改 core chart 的情况下替换任意绘制层。

Inheritance

Constructors

KLineChart({Key? key, required List<T> dataSource, required KLineChartDelegate<T> delegate, KLineController? controller, KLineTheme theme = const KLineTheme(), KLineLayoutConfig layout = const KLineLayoutConfig(), KLineBehaviorConfig behavior = const KLineBehaviorConfig(), WidgetBuilder? loadingBuilder, WidgetBuilder? emptyBuilder, bool isLoading = false})
创建一个 K 线核心图表。
const

Properties

behavior → KLineBehaviorConfig
图表交互行为配置。
final
controller → KLineController?
外部控制器。
final
dataSource → List<T>
需要绘制的数据源。
final
delegate → KLineChartDelegate<T>
图表绘制和交互代理。
final
emptyBuilder → WidgetBuilder?
自定义空数据 UI。
final
hashCode → int
The hash code for this object.
no setterinherited
isLoading → bool
是否展示加载态。
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layout → KLineLayoutConfig
图表布局配置。
final
loadingBuilder → WidgetBuilder?
自定义加载态 UI。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
theme → KLineTheme
图表主题配置。
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<KLineChart<T>>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited