public class Graph
extends java.lang.Object
| Constructor and Description |
|---|
Graph()
Default constructor for a Graph
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDataPoint(int year,
int value)
Adds a data point to the graph at a given year and a value
|
void |
addDataPoint(int year,
int[] grossIncome,
int[] foodProduced,
int[] foodConsumed)
Addes a data point to the graph for food production/consumption graph
|
javafx.scene.chart.LineChart |
getLineChart()
Returns the lineChart to display on the GUIOrig
|
javafx.collections.ObservableList<javafx.scene.chart.XYChart.Data<java.lang.Integer,java.lang.Integer>> |
initializeDataset()
Initializes the dataset so there's no null pointers
|
public void addDataPoint(int year,
int[] grossIncome,
int[] foodProduced,
int[] foodConsumed)
year - grossIncome - foodProduced - foodConsumed - public void addDataPoint(int year,
int value)
year - year to add (x value of the data point)value - y value of the data pointpublic javafx.collections.ObservableList<javafx.scene.chart.XYChart.Data<java.lang.Integer,java.lang.Integer>> initializeDataset()
public javafx.scene.chart.LineChart getLineChart()