YAxis class

y轴配置

Constructors

YAxis({required num max, num min = 0, AxisFormatter? formatter, bool drawLabel = true, int count = 5, bool zoom = false, bool drawLine = true, bool drawGrid = false, Color lineColor = const Color(0x99cccccc), TextStyle textStyle = const TextStyle(fontSize: 12, color: Colors.grey), bool drawDivider = true, AxisOffset? offset, double padding = 0})

Properties

count int
一屏显示的数量
final
density double
密度
getter/setter pair
drawDivider bool
是否有分隔线
final
drawGrid bool
是否画格子线
final
drawLabel bool
是否绘制label
final
drawLine bool
是否画轴线
final
fixedDensity double
固定的密度,也就是原始密度,不随缩放变动
getter/setter pair
formatter AxisFormatter?
文案格式化 不要使用过于耗时的方法
final
hashCode int
The hash code for this object.
no setterinherited
lineColor Color
最边上线的颜色
final
linePaint Paint
no setter
max num
最大值
final
min num
最小值
final
offset AxisOffset?
轴的偏移
final
padding double
文字距边的间隙
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textStyle TextStyle
文字风格
final
zoom bool
final

Methods

getDashPath(int index, Offset endPoint) Path
y轴对应的虚线
getHeight(num value, [bool fixed = false]) double
根据元数据计算出对应的高度
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