ChartPainter class

Inheritance

Constructors

ChartPainter(ChartStyle chartStyle, ChartColors chartColors, {required List<TrendLine> lines, required bool isTrendLine, required double selectY, required dynamic datas, required dynamic scaleX, required dynamic scrollX, required dynamic isLongPass, required dynamic selectX, required dynamic xFrontPadding, dynamic isOnTap, dynamic isTapShowInfoDialog, required VerticalTextAlignment verticalTextAlignment, dynamic mainState, dynamic volHidden, dynamic secondaryState, StreamSink<InfoWindowEntity?>? sink, bool isLine = false, bool hideGrid = false, bool showNowPrice = true, int fixedLength = 2, List<int> maDayList = const [5, 10, 20]})

Properties

chartColors ChartColors
final
chartStyle ChartStyle
final
datas List<KLineEntity>?
getter/setter pairinherited
deaColor Color?
getter/setter pair
difColor Color?
getter/setter pair
dnColor Color?
getter/setter pair
fixedLength int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hideGrid bool
final
isLine bool
getter/setter pairinherited
isLongPress bool
getter/setter pairinherited
isOnTap bool
getter/setter pairinherited
isrecordingCord bool
getter/setter pair
isTapShowInfoDialog bool
getter/setter pairinherited
isTrendLine bool
final
jColor Color?
getter/setter pair
lines List<TrendLine>
final
ma10Color Color?
getter/setter pair
ma30Color Color?
getter/setter pair
ma5Color Color?
getter/setter pair
macdColor Color?
getter/setter pair
maDayList List<int>
getter/setter pair
mainState MainState
getter/setter pairinherited
mBottomPadding double
getter/setter pairinherited
mChildPadding double
getter/setter pairinherited
mDataLen double
getter/setter pairinherited
mDisplayHeight double
getter/setter pairinherited
mFormats List<String>
getter/setter pairinherited
mGridColumns int
getter/setter pairinherited
mGridRows int
getter/setter pairinherited
mItemCount int
getter/setter pairinherited
mMainHighMaxValue double
getter/setter pairinherited
mMainLowMinValue double
getter/setter pairinherited
mMainMaxIndex int
getter/setter pairinherited
mMainMaxValue double
getter/setter pairinherited
mMainMinIndex int
getter/setter pairinherited
mMainMinValue double
getter/setter pairinherited
mMainRect Rect
getter/setter pairinherited
mMainRenderer BaseChartRenderer
getter/setter pair
mPointWidth double
getter/setter pairinherited
mSecondaryMaxValue double
getter/setter pairinherited
mSecondaryMinValue double
getter/setter pairinherited
mSecondaryRect Rect?
getter/setter pairinherited
mSecondaryRenderer BaseChartRenderer?
getter/setter pair
mStartIndex int
getter/setter pairinherited
mStopIndex int
getter/setter pairinherited
mTopPadding double
getter/setter pairinherited
mTranslateX double
getter/setter pairinherited
mVolMaxValue double
getter/setter pairinherited
mVolMinValue double
getter/setter pairinherited
mVolRect Rect?
getter/setter pairinherited
mVolRenderer BaseChartRenderer?
getter/setter pair
mWidth double
getter/setter pairinherited
nowPricePaint Paint
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleX double
getter/setter pairinherited
scrollX double
getter/setter pairinherited
secondaryState SecondaryState
getter/setter pairinherited
selectorBorderPaint Paint
getter/setter pair
selectPointPaint Paint
getter/setter pair
selectX double
getter/setter pairinherited
selectY double
final
semanticsBuilder SemanticsBuilderCallback?
Returns a function that builds semantic information for the picture drawn by this painter.
no setterinherited
showNowPrice bool
final
sink StreamSink<InfoWindowEntity?>?
getter/setter pair
upColor Color?
getter/setter pair
verticalTextAlignment VerticalTextAlignment
final
volColor Color?
getter/setter pair
volHidden bool
getter/setter pairinherited
xFrontPadding double
getter/setter pairinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be notified when it is time to repaint.
inherited
calculateSelectedX(double selectX) int
计算长按后x的值,转换为index
inherited
calculateValue() → dynamic
inherited
drawBg(Canvas canvas, Size size) → void
override
drawChart(Canvas canvas, Size size) → void
override
drawCrossLine(Canvas canvas, Size size) → void
画交叉线
override
drawCrossLineText(Canvas canvas, Size size) → void
override
drawDate(Canvas canvas, Size size) → void
override
drawGrid(dynamic canvas) → void
override
drawMaxAndMin(Canvas canvas) → void
override
drawNowPrice(Canvas canvas) → void
override
drawText(Canvas canvas, KLineEntity data, double x) → void
override
drawTrendLines(Canvas canvas, Size size) → void
drawVerticalText(dynamic canvas) → void
override
getDate(int? date) String
getItem(int position) KLineEntity
inherited
getMainMaxMinValue(KLineEntity item, int i) → void
inherited
getMainY(double y) double
getMinTranslateX() double
获取平移的最小值
inherited
getSecondaryMaxMinValue(KLineEntity item) → void
inherited
getTextPainter(dynamic text, dynamic color) TextPainter
getTextStyle(Color color) TextStyle
inherited
getVolMaxMinValue(KLineEntity item) → void
inherited
getX(int position) double
根据索引索取x坐标
inherited
hitTest(Offset position) bool?
Called whenever a hit test is being performed on an object that is using this custom paint delegate.
inherited
indexOfTranslateX(double translateX) int
inherited
initChartRenderer() → void
override
initFormats() → void
inherited
initRect(Size size) → void
inherited
isInMainRect(Offset point) bool
点是否在MainRect中
isInSecondaryRect(Offset point) bool
点是否在SecondaryRect中
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(Canvas canvas, Size size) → void
Called whenever the object needs to paint. The given Canvas has its coordinate space configured such that the origin is at the top left of the box. The area of the box is the size of the size argument.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies when it is time to repaint.
inherited
setTranslateXFromScrollX(double scrollX) → void
scrollX 转换为 TranslateX
inherited
shouldRebuildSemantics(covariant CustomPainter oldDelegate) bool
Called whenever a new instance of the custom painter delegate class is provided to the RenderCustomPaint object, or any time that a new CustomPaint object is created with a new instance of the custom painter delegate class (which amounts to the same thing, because the latter is implemented in terms of the former).
inherited
shouldRepaint(covariant BaseChartPainter oldDelegate) bool
Called whenever a new instance of the custom painter delegate class is provided to the RenderCustomPaint object, or any time that a new CustomPaint object is created with a new instance of the custom painter delegate class (which amounts to the same thing, because the latter is implemented in terms of the former).
inherited
toString() String
A string representation of this object.
inherited
translateXtoX(double translateX) double
translateX转化为view中的x
inherited
xToTranslateX(double x) double
inherited

Operators

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

Static Properties

maxScrollX → dynamic
no setter