Class Chart<ST extends Styler, S extends Series>

java.lang.Object
org.knowm.xchart.internal.chartpart.Chart<ST,S>
Direct Known Subclasses:
BoxChart, BubbleChart, CategoryChart, DialChart, HeatMapChart, OHLCChart, PieChart, RadarChart, XYChart

public abstract class Chart<ST extends Styler, S extends Series> extends Object
An XChart Chart
  • Field Details

  • Constructor Details

    • Chart

      protected Chart(int width, int height, ST styler)
      Constructor
      Parameters:
      width -
      height -
      styler -
  • Method Details

    • paint

      public abstract void paint(Graphics2D g, int width, int height)
    • paintBackground

      protected void paintBackground(Graphics2D g)
    • getStyler

      public ST getStyler()
      Gets the Chart's styler, which can be used to customize the Chart's appearance
      Returns:
      the styler
    • removeSeries

      public S removeSeries(String seriesName)
    • getWidth

      public int getWidth()
      Getters and Setters
    • setWidth

      protected void setWidth(int width)
    • getHeight

      public int getHeight()
    • setHeight

      protected void setHeight(int height)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getXAxisTitle

      public String getXAxisTitle()
    • setXAxisTitle

      public void setXAxisTitle(String xAxisTitle)
    • getYAxisTitle

      public String getYAxisTitle()
    • setYAxisTitle

      public void setYAxisTitle(String yAxisTitle)
    • getYAxisGroupTitle

      public String getYAxisGroupTitle(int yAxisGroup)
    • setYAxisGroupTitle

      public void setYAxisGroupTitle(int yAxisGroup, String yAxisTitle)
    • addAnnotation

      public void addAnnotation(Annotation annotation)
    • setCustomXAxisTickLabelsFormatter

      public void setCustomXAxisTickLabelsFormatter(Function<Double,String> customFormattingFunction)
      Parameters:
      customFormattingFunction -
    • setCustomYAxisTickLabelsFormatter

      public void setCustomYAxisTickLabelsFormatter(Function<Double,String> customFormattingFunction)
      Parameters:
      customFormattingFunction -
    • getChartTitle

      ChartTitle<ST,S> getChartTitle()
      Chart Parts Getters
    • getLegend

      Legend_<ST,S> getLegend()
    • getPlot

      Plot_<ST,S> getPlot()
    • getXAxis

      Axis getXAxis()
    • getYAxis

      Axis getYAxis()
    • getYAxis

      Axis getYAxis(int yIndex)
    • getAxisPair

      AxisPair getAxisPair()
    • getXAxisFormat

      Format getXAxisFormat()
    • getYAxisFormat

      Format getYAxisFormat()
    • getYAxisFormat

      Format getYAxisFormat(String yAxisDecimalPattern)
    • getChartXFromCoordinate

      public double getChartXFromCoordinate(int screenX)
    • getChartYFromCoordinate

      public double getChartYFromCoordinate(int screenY)
    • getChartYFromCoordinate

      public double getChartYFromCoordinate(int screenY, int yIndex)
    • getScreenXFromChart

      public double getScreenXFromChart(double xValue)
    • getScreenYFromChart

      public double getScreenYFromChart(double yValue)
    • getScreenYFromChart

      public double getScreenYFromChart(double yValue, int yIndex)
    • getYAxisLeftWidth

      public double getYAxisLeftWidth()
    • getSeriesMap

      public Map<String,S> getSeriesMap()