BrokenLine class

适用于需要折线图,曲线图的场景 支持数据过多时左右滑动查看数据 支持 X、Y 轴自定义展示文本内容

Inheritance

Constructors

BrokenLine({Key? key, required Size size, required List<PointsLine> lines, EdgeInsets contentPadding = const EdgeInsets.only(left: 10, right: 10), Color? backgroundColor, double xyDialLineWidth = 2, Color? xDialColor, Color? yDialColor, double yHintLineOffset = 20.0, bool showPointDashLine = true, double dialWidth = 4, double? xDialMin, double? xDialMax, List<DialItem>? xDialValues, required double yDialMin, required double yDialMax, List<DialItem>? yDialValues, bool isShowXHintLine = true, bool isShowYHintLine = false, bool isHintLineSolid = true, Color? hintLineColor, bool isTipWindowAutoDismiss = true, bool isShowXDialText = false, bool isShowYDialText = false, bool isShowXDial = true})

Properties

backgroundColor Color?
绘制的背景色
final
contentPadding EdgeInsets
图标内容区域 padding(不包含坐标轴),默认 EdgeInsets.only(left: 10, right: 10)
final
dialWidth double
刻度的宽度或者高度,默认 4
final
hashCode int
The hash code for this object.
no setterinherited
hintLineColor Color?
辅助线颜色
final
isHintLineSolid bool
辅助线是否为实线,在显示辅助线的时候才有效,false的话为虚线,默认true,实线
final
isShowXDial bool
是否绘制 x 刻度
final
isShowXDialText bool
是否展示 x 坐标刻度,默认 false
final
isShowXHintLine bool
x轴的辅助线是否展示,默认 true
final
isShowYDialText bool
是否展示 y 坐标刻度,默认 false
final
isShowYHintLine bool
y轴的辅助线是否展示,默认 false
final
isTipWindowAutoDismiss bool
提示 widget 是否自动消失。默认为 true
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lines List<PointsLine>
绘制线条的参数内容
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showPointDashLine bool
选中数据点时,是否展示数据点辅助线。默认 true
final
size Size
表格宽高
final
xDialColor Color?
xy轴的颜色
final
xDialMax double?
x轴最小值,最大值,用来计算内部绘制点的x轴位置
final
xDialMin double?
x轴最小值,最大值,用来计算内部绘制点的x轴位置
final
xDialValues List<DialItem>?
x 轴刻度
final
xyDialLineWidth double
xy轴线条的宽度,默认 2
final
yDialColor Color?
xy轴的颜色
final
yDialMax double
y轴最小值,最大值,用来计算内部绘制点的y轴位置
final
yDialMin double
y轴最小值,最大值,用来计算内部绘制点的y轴位置
final
yDialValues List<DialItem>?
y轴左侧刻度显示,不传则没有
final
yHintLineOffset double
Y 轴辅助线向右偏移量,默认 20
final

Methods

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