Package reportWriter
Class ReportChart
java.lang.Object
reportWriter.ReportChart
- Author:
 - mo55
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassInner class that does all of the work. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a data series to the chartgetImage()Return a BufferedImage of the chart.javafx.scene.chart.NumberAxisReturn a link to the chart's x-axis object.javafx.scene.chart.NumberAxisReturn a link to the chart's y-axis object.voidsetAxisTitles(String xTitle, String yTitle) Set the axis titles.voidsetXAxisParams(double lower, double upper, double tick) Set the x axis parameters.voidsetYAxisParams(double lower, double upper, double tick) Set the y axis parameters. 
- 
Constructor Details
- 
ReportChart
Main constructor. This initializes the FX Toolkit by creating a JFXPanel, so that we can then use the JFX objects later- Parameters:
 title- The title of the chart (can be null)
 
 - 
 - 
Method Details
- 
addSeries
Add a data series to the chart- Parameters:
 seriesName- A descriptor of the series (required)xVals- The x-values (must be the same size as yVals)yVals- The y-values (must be the same size as xVals)
 - 
getImage
Return a BufferedImage of the chart.- Returns:
 - an image of the chart, or null if there was a problem
 
 - 
setAxisTitles
Set the axis titles. If this method is not called, the axes will be unlabelled- Parameters:
 xTitle-yTitle-
 - 
setXAxisParams
public void setXAxisParams(double lower, double upper, double tick) Set the x axis parameters. If this method is not called, the parameters will be generated automatically- Parameters:
 lower- the value of the lower bound of the axisupper- the value of the upper bound of the axistick- the value between each major tick mark
 - 
setYAxisParams
public void setYAxisParams(double lower, double upper, double tick) Set the y axis parameters. If this method is not called, the parameters will be generated automatically- Parameters:
 lower- the value of the lower bound of the axisupper- the value of the upper bound of the axistick- the value between each major tick mark
 - 
getXAxisObject
public javafx.scene.chart.NumberAxis getXAxisObject()Return a link to the chart's x-axis object. Can be used for advanced control of the x axis parameters- Returns:
 - NumberAxis representing the x-axis
 
 - 
getyAxisObject
public javafx.scene.chart.NumberAxis getyAxisObject()Return a link to the chart's y-axis object. Can be used for advanced control of the y axis parameters- Returns:
 - NumberAxis representing the y-axis
 
 
 -