public static XYChart.Series createSeries(String name, String date[], double value[]) {
        XYChart.Series series = new XYChart.Series();
        series.setName(name);
        for (int i = 0; i < date.length; i++) {
            series.getData().add(new XYChart.Data(date[i], value[i]));
        }

        return series;
    }