Package org.silverpeas.core.chart.pie
Class PieChart
- java.lang.Object
-
- org.silverpeas.core.chart.AbstractChart<PieChartItem>
-
- org.silverpeas.core.chart.pie.PieChart
-
- All Implemented Interfaces:
Chart<PieChartItem>
public class PieChart extends AbstractChart<PieChartItem>
- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PieChartItem
add(String label, Number value)
Adds a new pie part.static PieChart
fromTitle(String title)
Initializes a new chart with the specified title that will provides the data in order to display them on a pie graphic.ChartType
getType()
Gets the type of chart.static PieChart
withoutTitle()
Initializes a new chart without title that will provides the data in order to display them on a pie graphic.-
Methods inherited from class org.silverpeas.core.chart.AbstractChart
add, addExtra, asJson, computeExtraDataAsJson, getExtra, getItems, getTitle, withTitle
-
-
-
-
Method Detail
-
fromTitle
public static PieChart fromTitle(String title)
Initializes a new chart with the specified title that will provides the data in order to display them on a pie graphic.- Parameters:
title
- the main title of the chart.- Returns:
- a new instance of
PieChart
.
-
withoutTitle
public static PieChart withoutTitle()
Initializes a new chart without title that will provides the data in order to display them on a pie graphic.- Returns:
- a new instance of
PieChart
.
-
getType
public ChartType getType()
Description copied from interface:Chart
Gets the type of chart.- Returns:
- the
ChartType
.
-
add
public PieChartItem add(String label, Number value)
Adds a new pie part.- Parameters:
label
- the label.value
- the value.- Returns:
- the
PieChartItem
that represents the given value.
-
-