public static void addPoint(LineChart<String, Number> lineChart, String date, Number value, boolean removeFirstPoint) {
        XYChart.Series<String, Number> s = lineChart.getData().get(0);

        if (removeFirstPoint) {
            s.getData().remove(0);   //jesli chcemy rowniez usunac najstarszy element 
        }

        s.getData().add(new LineChart.Data<String, Number>(date, value));
    }