Datasets:
ArXiv:
License:
File size: 4,254 Bytes
c574d3a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
package courseworkapp;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.StackedAreaChart;
import javafx.scene.chart.XYChart;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import javafx.stage.Stage;
public class ChartPoundController implements Initializable {
private Parent page;
private Stage stage;
private Scene scene;
@FXML
private Button buyPoundBtn;
@FXML
private StackedAreaChart<String, NumberAxis> stackAreaChartPound;
@FXML
void handleButtonPoundBuy(MouseEvent event) throws IOException {
page=FXMLLoader.load(getClass().getResource("FormSubmission.fxml"));
stage=(Stage)((Node)event.getSource()).getScene().getWindow();
scene=new Scene(page);
stage.setScene(scene);
stage.show();
}
@FXML
void handleButtonPoundSell(MouseEvent event) {
}
@FXML
void switchToSubmissionForm(ActionEvent event) {
}
@FXML
void currencyBtnHandler(ActionEvent event) throws IOException {
page=FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
stage=(Stage)((Node)event.getSource()).getScene().getWindow();
scene=new Scene(page);
stage.setScene(scene);
stage.show();
}
@FXML
void dayChartHndlr(ActionEvent event) {
}
@FXML
void myCabBtnHndlr(ActionEvent event) throws IOException {
page=FXMLLoader.load(getClass().getResource("ChartPound.fxml"));
stage=(Stage)((Node)event.getSource()).getScene().getWindow();
scene=new Scene(page);
stage.setScene(scene);
stage.show();
}
@FXML
void weekChartHandler(ActionEvent event) {
}
@FXML
void yearChartHandler(ActionEvent event) {
}
void openChartPound(ActionEvent event) {
}
@Override
public void initialize(URL location, ResourceBundle resources) {
NumberAxis xAxis = new NumberAxis();
xAxis.setLabel("7 Day Interval");
NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Visits");
XYChart.Series dataSeries1 = new XYChart.Series();
dataSeries1.setName("April");
dataSeries1.getData().add(new XYChart.Data( 0, 567));
dataSeries1.getData().add(new XYChart.Data( 1, 612));
dataSeries1.getData().add(new XYChart.Data( 2, 800));
dataSeries1.getData().add(new XYChart.Data( 3, 780));
dataSeries1.getData().add(new XYChart.Data( 4, 650));
dataSeries1.getData().add(new XYChart.Data( 5, 610));
dataSeries1.getData().add(new XYChart.Data( 6, 590));
stackAreaChartPound.getData().add(dataSeries1);
XYChart.Series dataSeries2 = new XYChart.Series();
dataSeries2.setName("May");
dataSeries2.getData().add(new XYChart.Data( 0, 101));
dataSeries2.getData().add(new XYChart.Data( 1, 110));
dataSeries2.getData().add(new XYChart.Data( 2, 140));
dataSeries2.getData().add(new XYChart.Data( 3, 132));
dataSeries2.getData().add(new XYChart.Data( 4, 115));
dataSeries2.getData().add(new XYChart.Data( 5, 109));
dataSeries2.getData().add(new XYChart.Data( 6, 105));
stackAreaChartPound.getData().add(dataSeries2);
XYChart.Series dataSeries3 = new XYChart.Series();
dataSeries3.setName("June");
dataSeries3.getData().add(new XYChart.Data( 0, 140));
dataSeries3.getData().add(new XYChart.Data( 1, 110));
dataSeries3.getData().add(new XYChart.Data( 2, 110));
dataSeries3.getData().add(new XYChart.Data( 3, 132));
dataSeries3.getData().add(new XYChart.Data( 4, 110));
dataSeries3.getData().add(new XYChart.Data( 5, 110));
dataSeries3.getData().add(new XYChart.Data( 6, 105));
stackAreaChartPound.getData().add(dataSeries3);
}
}
|