LineChart class

具体实现在LineChartPainter

Inheritance

Constructors

LineChart({Key? key, List<LineChartPoint>? points, Color bgColor = const Color(0xFFF7F8FA), Size size = Size.infinite, Color xAxisColor = const Color(0xFFE2E4EA), double xAxisWidth = 1, Color yAxisColor = const Color(0xFFE2E4EA), double yAxisWidth = 1, bool showYAxis = false, int xLineNums = 1, Color lineColor = const Color(0xFF1678FF), double lineWidth = 1, bool showXLineText = false, Color xLineTextColor = const Color(0xFF858B9C), LineChartPointConfig? config, bool showYLineMark = false, SelectedCallback? selectedCallback, List<List<LineChartPoint>>? multipleLinePoints, List<Color>? multipleLinePointsColor, List<String>? xLineMarks, String? yUnit = '', bool useUnifyYUnit = false, LineChartController? controller})

Properties

bgColor Color
final
config LineChartPointConfig?
折线图上点的设置
final
controller LineChartController?
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lineColor Color
final
lineWidth double
final
multipleLinePoints List<List<LineChartPoint>>?
final
multipleLinePointsColor List<Color>?
final
points List<LineChartPoint>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedCallback SelectedCallback?
final
showXLineText bool
final
showYAxis bool
final
showYLineMark bool
显示Y轴上的标记文案
final
size Size
final
useUnifyYUnit bool
final
xAxisColor Color
final
xAxisWidth double
final
xLineMarks List<String>?
final
xLineNums int
final
xLineTextColor Color
final
yAxisColor Color
final
yAxisWidth double
final
yUnit String?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<LineChart>
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}) 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