PieChartPainter class
Paints PieChartData in the canvas, it can be used in a CustomPainter
- Inheritance
-
- Object
- BaseChartPainter<
PieChartData> - PieChartPainter
Constructors
- PieChartPainter()
-
Paints
dataList
into canvas, it is the animating PieChartData,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
-
calculateCenterRadius(
Size viewSize, PaintHolder< PieChartData> holder) → double - Calculates center radius based on the provided sections radius
-
calculateSectionsAngle(
List< PieChartSectionData> sections, double sumValue) → List<double> -
createRectPathAroundLine(
Line line, double width) → Path - Creates a rect around a narrow line
-
drawCenterSpace(
CanvasWrapper canvasWrapper, double centerRadius, PaintHolder< PieChartData> holder) → void -
drawSection(
PieChartSectionData section, Path sectionPath, CanvasWrapper canvasWrapper) → void -
drawSections(
CanvasWrapper canvasWrapper, List< double> sectionsAngle, double centerRadius, PaintHolder<PieChartData> holder) → void -
drawSectionStroke(
PieChartSectionData section, Path sectionPath, CanvasWrapper canvasWrapper, Size viewSize) → void -
drawTexts(
BuildContext context, CanvasWrapper canvasWrapper, PaintHolder< PieChartData> holder, double centerRadius) → void - Calculates layout of overlaying elements, includes:
-
generateSectionPath(
PieChartSectionData section, double sectionSpace, double tempAngle, double sectionDegree, Offset center, double centerRadius) → Path - Generates a path around a section
-
getBadgeOffsets(
Size viewSize, PaintHolder< PieChartData> holder) → Map<int, Offset> - Exposes offset for laying out the badge widgets upon the chart.
-
handleTouch(
Offset localPosition, Size viewSize, PaintHolder< PieChartData> holder) → PieTouchedSection -
Makes a PieTouchedSection 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< PieChartData> holder) → void -
Paints PieChartData into the provided canvas.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited