ChartPainter class
- Inheritance
-
- Object
- Listenable
- CustomPainter
- BaseChartPainter
- ChartPainter
Constructors
-
ChartPainter(ChartStyle chartStyle, ChartColors chartColors, {required List<
TrendLine> lines, required bool isTrendLine, required double selectY, required StreamSink<InfoWindowEntity?> sink, required dynamic datas, required dynamic scaleX, required dynamic scrollX, required dynamic isLongPass, required dynamic selectX, required dynamic xFrontPadding, required BaseDimension baseDimension, dynamic isOnTap, dynamic isTapShowInfoDialog, required VerticalTextAlignment verticalTextAlignment, dynamic mainState, dynamic volHidden, dynamic secondaryStateLi, bool isLine = false, bool hideGrid = false, bool showNowPrice = true, int fixedLength = 2, List<int> maDayList = const [5, 10, 20]})
Properties
- baseDimension → BaseDimension
-
final
- 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
- ma5Color ↔ Color?
-
getter/setter pair
- ma10Color ↔ Color?
-
getter/setter pair
- ma30Color ↔ 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
-
Rectangle box of main chart
getter/setter pairinherited
- mMainRenderer ↔ BaseChartRenderer
-
getter/setter pair
- mPointWidth ↔ double
-
getter/setter pairinherited
-
mSecondaryRectList
↔ List<
RenderRect> -
Secondary list support
getter/setter pairinherited
-
mSecondaryRendererList
↔ Set<
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?
-
Rectangle box of the vol chart
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
-
secondaryStateLi
↔ Set<
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 -
calculate the value of x after long pressing and convert to
index
inherited -
calculateValue(
) → dynamic -
calculate values
inherited
-
drawBg(
Canvas canvas, Size size) → void -
draw the background of chart
override
-
drawChart(
Canvas canvas, Size size) → void -
draw chart
override
-
drawCrossLine(
Canvas canvas, Size size) → void -
draw cross lines
override
-
drawCrossLineText(
Canvas canvas, Size size) → void -
draw text of the cross line
override
-
drawDate(
Canvas canvas, Size size) → void -
draw date
override
-
drawGrid(
dynamic canvas) → void -
draw the grid of chart
override
-
drawMaxAndMin(
Canvas canvas) → void -
draw maximum and minimum values
override
-
drawNowPrice(
Canvas canvas) → void -
draw the current price
override
-
drawText(
Canvas canvas, KLineEntity data, double x) → void -
draw text
override
-
drawTrendLines(
Canvas canvas, Size size) → void -
drawVerticalText(
dynamic canvas) → void -
draw vertical text
override
-
getDate(
int? date) → String -
getItem(
int position) → KLineEntity -
inherited
-
getMainMaxMinValue(
KLineEntity item, int i) → void -
compute maximum and minimum value
inherited
-
getMainY(
double y) → double -
getMinTranslateX(
) → double -
get the minimum value of translation
inherited
-
getSecondaryMaxMinValue(
int index, KLineEntity item) → dynamic -
inherited
-
getTextPainter(
dynamic text, dynamic color) → TextPainter -
getTextStyle(
Color color) → TextStyle -
define text style
inherited
-
getVolMaxMinValue(
KLineEntity item) → void -
inherited
-
getX(
int position) → double -
Get x coordinate based on index
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 -
init chart renderer
override
-
initFormats(
) → void -
init format time
inherited
-
initRect(
Size size) → void -
init the rectangle box to draw chart
inherited
-
isInMainRect(
Offset point) → bool - Whether the point is in the SecondaryRect Whether the point is in MainRect
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
Canvas canvas, Size size) → void -
paint chart
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 convert to 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 is converted to X in view
inherited
-
xToTranslateX(
double x) → double -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- maxScrollX → dynamic
-
no setter