public class PieChartOptions extends Options
Constructor and Description |
---|
PieChartOptions() |
Modifier and Type | Method and Description |
---|---|
void |
setDonutHoleRadius(double donusHoleRadius)
A number between
0 and 1 that represents the center hole's radius. |
void |
setLabelRadius(double radius)
A number between
0 and 1 that represents the position of the labels from the center. |
void |
setTilt(double tilt)
A number between
0 and 1 that represents the pie chart's percentage of tilt. |
void |
showLabels(boolean show)
Determines whether or not to show labels that annotate pie chart slices.
|
setColors, setLegendPosition, setNumberOfColumnsInTheLegend, showGrid, showLegend, showTooltip
public void showLabels(boolean show)
Default value: false
.
public void setLabelRadius(double radius)
0
and 1
that represents the position of the labels from the center.
A value of 0
means the labels are drawn at the very center of the pie chart, potentially
juxtaposing with each other.
A value of 1
means the labels are drawn at the edge of the pie chart.
Default value: 1
.
public void setTilt(double tilt)
0
and 1
that represents the pie chart's percentage of tilt.
A value of 0
represents a completely horizontal pie chart, reducing the view to a line.
A value of 1
represents a fully vertical view of the pie chart.
Default value: 1
.
public void setDonutHoleRadius(double donusHoleRadius)
0
and 1
that represents the center hole's radius.
This can be used to create donut hole pie charts.
A value of 0
represents a classical pie chart, with no hole in the center.
A value 1
represents a pie chart with the hole having the same radius as the pie chart. The
pie chart will not be visible if you use a value of 1.
Note: The radius is relative to the size of container and not the pie chart. In certain
circumstances, such as when showing the legend or when showing labels, the pie chart will
adapt to a smaller size so as to accommodate the extra items. In this particular circumstance
a high donut hole radius may render the pie chart invisible.
Default value: 0
.