Package com.storedobject.svg.chart
Class Pie
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()Build the pie chart SVG.doubleGet the padding.final booleanisDonut()Check if the chart is a donut chart.voidsetDonutHoleRadius(double donutHoleRadius) Set the radius of the donut hole.voidsetPadding(double padding) Set the padding.voidsetRadius(double radius) Set the radius of the pie.voidsetShowLegend(boolean showLegend) Set whether to show the legend.Methods inherited from class com.storedobject.svg.chart.Chart
addValue, addValue, colorize, compute, extraContent, getValues, isBuilt, setLabelName, setUnit, setValueName, tagMethods inherited from class com.storedobject.svg.Node
attributes, copy, createDocument, equals, escapeXml, flipHorizontally, flipHorizontallyAroundOrigin, flipVertically, flipVerticallyAroundOrigin, getCoordinates, getId, getMargin, getSvg, hashCode, id, ID, IDValue, innerContent, moveTo, moveTo, rotate, rotateAround, rotateAround, rotateAroundCenter, scale, scale, scaleHeightTo, scaleTo, scaleWidthTo, styles, toString, toString, transform, translate, translate
-
Constructor Details
-
Pie
public Pie()Constructor. -
Pie
public Pie(double radius) Constructor with radius.- Parameters:
radius- Radius of the chart.
-
Pie
Constructor with values and radius.- Parameters:
values- Values to be plotted.radius- Radius of the chart.
-
Pie
-
-
Method Details
-
setRadius
public void setRadius(double radius) Set the radius of the pie.- Parameters:
radius- Radius in pixels.
-
setDonutHoleRadius
public void setDonutHoleRadius(double donutHoleRadius) Set the radius of the donut hole. If set, the chart becomes a donut chart.- Parameters:
donutHoleRadius- Radius of the donut hole in pixels.
-
isDonut
public final boolean isDonut()Check if the chart is a donut chart.- Returns:
- True if donut chart.
-
setShowLegend
public void setShowLegend(boolean showLegend) Set whether to show the legend.- Parameters:
showLegend- True to show the legend.
-
setPadding
public void setPadding(double padding) Set the padding.- Parameters:
padding- Padding.
-
getPadding
public double getPadding()Get the padding.- Returns:
- Padding.
-
build
-