org.silverpeas.chart.pie
Class PieChart

java.lang.Object
  extended by org.silverpeas.chart.AbstractChart<PieChartItem>
      extended by org.silverpeas.chart.pie.PieChart
All Implemented Interfaces:
Chart<PieChartItem>

public class PieChart
extends AbstractChart<PieChartItem>

Author:
Yohann Chastagnier

Method Summary
 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.chart.AbstractChart
add, addExtra, asJson, computeExtraDataAsJson, getExtra, getItems, getTitle, withTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


Copyright © 2016 Silverpeas. All Rights Reserved.