Line<T> class
@author JD
- Inheritance
-
- Object
- ChartBodyRender<
T> - Line
- Mixed-in types
Constructors
-
Line({required List<
T> data, required ChartPosition<T> position, required LinePosition values, int yAxisPosition = 0, List<Color> colors = colors10, List<Shader> ? shaders, List<Color> ? dotColors, double dotRadius = 2, double strokeWidth = 1, bool isHollow = false, bool? filled = false, bool isCurve = false, PathOperation? operation, bool async = false})
Properties
- async → bool
-
是否异步初始化布局
final
- chartState ↔ ChartLayoutState
-
图表的布局状态
getter/setter pairinherited
-
colors
→ List<
Color> -
线颜色
final
- controller ↔ ChartController
-
getter/setter pairinherited
-
data
→ List<
T> -
数据源
finalinherited
-
dotColors
→ List<
Color> ? -
点的颜色
final
- dotRadius → double
-
点半径
final
- filled → bool?
-
是否填充颜色 true:填充,false:不填充 默认false
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index ↔ int
-
在图表中的位置
getter/setter pairinherited
- isCurve → bool
-
是否是曲线 默认false
final
- isHollow → bool
-
是否有空心圆
final
- isInit ↔ bool
-
getter/setter pairinherited
- operation → PathOperation?
-
路径之间的处理规则
final
-
position
→ ChartPosition<
T> -
不要使用过于耗时的方法
数据在坐标系的位置,每个坐标系下取值逻辑不一样,在line和bar下是相对于每格的值,比如xAxis的interval为1,你的数据放在1列和2列中间,那么position就是0.5,在pie下是比例
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shaders
→ List<
Shader> ? -
优先级高于colors 跟filled有关,false是折线的颜色,true是填充色
final
- strokeWidth → double
-
线宽
final
- values → LinePosition
-
每个点对应的值 不要使用过于耗时的方法
final
- yAxisPosition → int
-
跟哪个y轴关联
finalinherited
Methods
-
asyncInitWithOutAnimal(
ChartsState state) → Map< int, LineInfo> -
inherited
-
draw(
Canvas canvas, ChartsState state) → void -
inherited
-
getLastData(
bool need) → List< ChartItemLayoutState> ? -
inherited
-
init(
ChartsState state) → void - 初始化 耗时的方法都可以放到这里
-
lerpList(
List< num> ? a, List<num> ? b, double t) → List<num> ? -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited