Class PieChart

java.lang.Object
org.knowm.xchart.internal.chartpart.Chart<PieStyler,PieSeries>
org.knowm.xchart.PieChart

public class PieChart extends org.knowm.xchart.internal.chartpart.Chart<PieStyler,PieSeries>
  • Field Summary

    Fields inherited from class org.knowm.xchart.internal.chartpart.Chart

    annotations, axisPair, chartTitle, legend, plot, seriesMap, styler
  • Constructor Summary

    Constructors
    Constructor
    Description
    PieChart(int width, int height)
    Constructor - the default Chart Theme will be used (XChartTheme)
    PieChart(int width, int height, Styler.ChartTheme chartTheme)
    Constructor
    PieChart(int width, int height, Theme theme)
    Constructor
    PieChart(PieChartBuilder chartBuilder)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    addSeries(String seriesName, Number value)
    Add a series for a Pie type chart
    void
    paint(Graphics2D g, int width, int height)
     
    updatePieSeries(String seriesName, Number value)
    Update a series by updating the pie slide value

    Methods inherited from class org.knowm.xchart.internal.chartpart.Chart

    addAnnotation, getChartXFromCoordinate, getChartYFromCoordinate, getChartYFromCoordinate, getHeight, getScreenXFromChart, getScreenYFromChart, getScreenYFromChart, getSeriesMap, getStyler, getTitle, getWidth, getXAxisTitle, getYAxisGroupTitle, getYAxisLeftWidth, getYAxisTitle, paintBackground, removeSeries, setCustomXAxisTickLabelsFormatter, setCustomYAxisTickLabelsFormatter, setHeight, setTitle, setWidth, setXAxisTitle, setYAxisGroupTitle, setYAxisTitle

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PieChart

      public PieChart(int width, int height)
      Constructor - the default Chart Theme will be used (XChartTheme)
      Parameters:
      width -
      height -
    • PieChart

      public PieChart(int width, int height, Theme theme)
      Constructor
      Parameters:
      width -
      height -
      theme - - pass in a instance of Theme class, probably a custom Theme.
    • PieChart

      public PieChart(int width, int height, Styler.ChartTheme chartTheme)
      Constructor
      Parameters:
      width -
      height -
      chartTheme - - pass in the desired ChartTheme enum
    • PieChart

      public PieChart(PieChartBuilder chartBuilder)
      Constructor
      Parameters:
      chartBuilder -
  • Method Details

    • addSeries

      public PieSeries addSeries(String seriesName, Number value)
      Add a series for a Pie type chart
      Parameters:
      seriesName -
      value -
      Returns:
    • updatePieSeries

      public PieSeries updatePieSeries(String seriesName, Number value)
      Update a series by updating the pie slide value
      Parameters:
      seriesName -
      value -
      Returns:
    • paint

      public void paint(Graphics2D g, int width, int height)
      Specified by:
      paint in class org.knowm.xchart.internal.chartpart.Chart<PieStyler,PieSeries>