Styling
All styling in the Piechart
and other chart widgets are Hierarchical from Top to Bottom. This means that the Bottom/Child level styling will override the Top/Parent level styling.
The class SliceDataStyle
provides the styling options for the Piechart
.
The Hierarchical Styling is available for labelStyle
which provides Text Styling for all the Pie piece labels of a Pie Chart.
Let's take an example to see how it works.
Above example will draw four Pie Slices as a PieChart. Now let's add styling to our Pie pieces in this example.
Series Styling
To provide uniform styling for All the Pie Pieces in the Piechart
, we provide the styling at Series Level to the seriesStyle
property of the PieSeries
class.
Pie Styling
Besides seriesStyle
, you can can also customize each individual pie with the property style for every SliceData
. This is the bottom most styling property and will override the parent series level styling.
The above example provides a clear picture of the Hierarchical Structure for styling across the widget tree classes.
SliceDataStyle Properties
radius
double?
false
null
labelPosition
double?
false
null
color
Color?
false
null
gradient
Gradient?
false
null
strokeWidth
double?
false
null
strokeColor
Color?
false
null
Last updated