BarChartPainter class
Paints BarChartData in the canvas, it can be used in a CustomPainter
- Inheritance
-
- Object
- BaseChartPainter<
BarChartData> - AxisChartPainter<
BarChartData> - BarChartPainter
Constructors
- BarChartPainter()
-
Paints
dataList
into canvas, it is the animating BarChartData,targetData
is the animation's target and remains the same during animation, then we should use it when we need to show tooltips or something like that, becausedataList
is changing constantly.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
calculateGroupAndBarsPosition(
Size viewSize, List< double> groupsX, List<BarChartGroupData> barGroups) → List<GroupBarsPosition> - Calculates bars position alongside group positions.
-
drawBackground(
CanvasWrapper canvasWrapper, PaintHolder< BarChartData> holder) → void -
This function draws a colored background behind the chart.
inherited
-
drawBars(
CanvasWrapper canvasWrapper, List< GroupBarsPosition> groupBarsPosition, PaintHolder<BarChartData> holder) → void -
drawExtraLines(
BuildContext context, CanvasWrapper canvasWrapper, PaintHolder< BarChartData> holder) → void -
inherited
-
drawGrid(
CanvasWrapper canvasWrapper, PaintHolder< BarChartData> holder) → void -
inherited
-
drawHorizontalLines(
BuildContext context, CanvasWrapper canvasWrapper, PaintHolder< BarChartData> holder, Size viewSize) → void -
inherited
-
drawRangeAnnotation(
CanvasWrapper canvasWrapper, PaintHolder< BarChartData> holder) → void -
inherited
-
drawStackItemBorderStroke(
CanvasWrapper canvasWrapper, BarChartRodStackItem stackItem, int index, int rodStacksSize, double barThickSize, RRect barRRect, Size drawSize, PaintHolder< BarChartData> holder) → void -
drawTouchTooltip(
BuildContext context, CanvasWrapper canvasWrapper, List< GroupBarsPosition> groupPositions, BarTouchTooltipData tooltipData, BarChartGroupData showOnBarGroup, int barGroupIndex, BarChartRodData showOnRodData, int barRodIndex, PaintHolder<BarChartData> holder) → void -
drawVerticalLines(
BuildContext context, CanvasWrapper canvasWrapper, PaintHolder< BarChartData> holder, Size viewSize) → void -
inherited
-
getPixelX(
double spotX, Size viewSize, PaintHolder< BarChartData> holder) → double -
With this function we can convert our AFlSpot x
to the view base axis x .
the view 0, 0 is on the top/left, but the spots is bottom/left
inherited
-
getPixelY(
double spotY, Size viewSize, PaintHolder< BarChartData> holder) → double -
With this function we can convert our AFlSpot y
to the view base axis y.
inherited
-
getTooltipLeft(
double dx, double tooltipWidth, FLHorizontalAlignment tooltipHorizontalAlignment, double tooltipHorizontalOffset) → double -
With this function we can get horizontal
position for the tooltip.
inherited
-
handleTouch(
Offset localPosition, Size viewSize, PaintHolder< BarChartData> holder) → BarTouchedSpot? -
Makes a BarTouchedSpot based on the provided
localPosition
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
BuildContext context, CanvasWrapper canvasWrapper, PaintHolder< BarChartData> holder) → void -
Paints BarChartData into the provided canvas.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited