BaseChartPainter class abstract

Inheritance
Implementers

Constructors

BaseChartPainter(ChartStyle chartStyle, {List<KLineEntity>? datas, required double scaleX, required double scrollX, required bool isLongPress, required double selectX, required double xFrontPadding, bool isOnTap = false, MainState mainState = MainState.MA, bool volHidden = false, bool isTapShowInfoDialog = false, SecondaryState secondaryState = SecondaryState.MACD, bool isLine = false})

Properties

chartStyle ChartStyle
final
datas List<KLineEntity>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isLine bool
getter/setter pair
isLongPress bool
getter/setter pair
isOnTap bool
getter/setter pair
isTapShowInfoDialog bool
getter/setter pair
mainState MainState
getter/setter pair
mBottomPadding double
getter/setter pair
mChildPadding double
getter/setter pair
mDataLen double
getter/setter pair
mDisplayHeight double
getter/setter pair
mFormats List<String>
getter/setter pair
mGridColumns int
getter/setter pair
mGridRows int
getter/setter pair
mItemCount int
getter/setter pair
mMainHighMaxValue double
getter/setter pair
mMainLowMinValue double
getter/setter pair
mMainMaxIndex int
getter/setter pair
mMainMaxValue double
getter/setter pair
mMainMinIndex int
getter/setter pair
mMainMinValue double
getter/setter pair
mMainRect Rect
getter/setter pair
mPointWidth double
getter/setter pair
mSecondaryMaxValue double
getter/setter pair
mSecondaryMinValue double
getter/setter pair
mSecondaryRect Rect?
getter/setter pair
mStartIndex int
getter/setter pair
mStopIndex int
getter/setter pair
mTopPadding double
getter/setter pair
mTranslateX double
getter/setter pair
mVolMaxValue double
getter/setter pair
mVolMinValue double
getter/setter pair
mVolRect Rect?
getter/setter pair
mWidth double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleX double
getter/setter pair
scrollX double
getter/setter pair
secondaryState SecondaryState
getter/setter pair
selectX double
getter/setter pair
semanticsBuilder SemanticsBuilderCallback?
Returns a function that builds semantic information for the picture drawn by this painter.
no setterinherited
volHidden bool
getter/setter pair
xFrontPadding double
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be notified when it is time to repaint.
inherited
calculateSelectedX(double selectX) int
计算长按后x的值,转换为index
calculateValue() → dynamic
drawBg(Canvas canvas, Size size) → void
drawChart(Canvas canvas, Size size) → void
drawCrossLine(Canvas canvas, Size size) → void
drawCrossLineText(Canvas canvas, Size size) → void
drawDate(Canvas canvas, Size size) → void
drawGrid(dynamic canvas) → void
drawMaxAndMin(Canvas canvas) → void
drawNowPrice(Canvas canvas) → void
drawText(Canvas canvas, KLineEntity data, double x) → void
drawVerticalText(dynamic canvas) → void
getItem(int position) KLineEntity
getMainMaxMinValue(KLineEntity item, int i) → void
getMinTranslateX() double
获取平移的最小值
getSecondaryMaxMinValue(KLineEntity item) → void
getTextStyle(Color color) TextStyle
getVolMaxMinValue(KLineEntity item) → void
getX(int position) double
根据索引索取x坐标
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
initChartRenderer() → void
initFormats() → void
initRect(Size size) → void
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.
override
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
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).
override
toString() String
A string representation of this object.
inherited
translateXtoX(double translateX) double
translateX转化为view中的x
xToTranslateX(double x) double

Operators

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

Static Properties

maxScrollX double
getter/setter pair