BaseChartPainter class abstract

BaseChartPainter

Inheritance
Implementers

Constructors

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

Properties

baseDimension BaseDimension
final
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
Rectangle box of main chart
getter/setter pair
mPointWidth double
getter/setter pair
mSecondaryRectList List<RenderRect>
Secondary list support
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?
Rectangle box of the vol chart
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
secondaryStateLi Set<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
calculate the value of x after long pressing and convert to index
calculateValue() → dynamic
calculate values
drawBg(Canvas canvas, Size size) → void
draw the background of chart
drawChart(Canvas canvas, Size size) → void
draw chart
drawCrossLine(Canvas canvas, Size size) → void
draw cross line
drawCrossLineText(Canvas canvas, Size size) → void
draw text of the cross line
drawDate(Canvas canvas, Size size) → void
draw date
drawGrid(dynamic canvas) → void
draw the grid of chart
drawMaxAndMin(Canvas canvas) → void
draw maximum and minimum values
drawNowPrice(Canvas canvas) → void
draw the current price
drawText(Canvas canvas, KLineEntity data, double x) → void
draw text
drawVerticalText(dynamic canvas) → void
draw vertical text
getItem(int position) KLineEntity
getMainMaxMinValue(KLineEntity item, int i) → void
compute maximum and minimum value
getMinTranslateX() double
get the minimum value of translation
getSecondaryMaxMinValue(int index, KLineEntity item) → dynamic
getTextStyle(Color color) TextStyle
define text style
getVolMaxMinValue(KLineEntity item) → void
getX(int position) double
Get x coordinate based on index
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
init chart renderer
initFormats() → void
init format time
initRect(Size size) → void
init the rectangle box to draw chart
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(Canvas canvas, Size size) → void
paint chart
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 convert to 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 is converted to X in view
xToTranslateX(double x) double

Operators

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

Static Properties

maxScrollX double
getter/setter pair