private void drawForeground() {
        ctxFg.clearRect(0, 0, width, height);
        ctxFg.setStroke(getSkinnable().getSeriesStroke());
        ctxFg.setLineCap(StrokeLineCap.ROUND);
        ctxFg.setLineJoin(StrokeLineJoin.ROUND);
        ctxFg.setLineWidth(0.025 * height);

        ctxFg.save();
        ctxFg.translate(0, sectionMinimum * heightFactor);

        widthFactor = width / (getSkinnable().getSeries().getData().size());
        int noOfDataPoints = getSkinnable().getSeries().getData().size();
        if (noOfDataPoints > 2) {
            for (int i = 0 ; i < noOfDataPoints - 1 ; i++) {
                XYChart.Data p1 = (XYChart.Data) getSkinnable().getSeries().getData().get(i);
                XYChart.Data p2 = (XYChart.Data) getSkinnable().getSeries().getData().get(i + 1);
                ctxFg.strokeLine(widthFactor / 2 + i * widthFactor, height - (Double) p1.getYValue() * heightFactor, widthFactor / 2 + (i + 1) * widthFactor, height - (Double) p2.getYValue() * heightFactor);
                drawBullet(ctxFg, widthFactor / 2 + i * widthFactor, height - (Double) p1.getYValue() * heightFactor, getSkinnable().getBulletFill());
            }
            drawBullet(ctxFg, widthFactor / 2 + (noOfDataPoints - 1) * widthFactor, height - (Double) (getSkinnable().getSeries().getData().get(noOfDataPoints - 1)).getYValue() * heightFactor, getSkinnable().getBulletFill());
        }
        ctxFg.save();
        ctxFg.applyEffect(new DropShadow(0.025 * height, 0, 0.025 * height, Color.rgb(0, 0, 0, 0.65)));
        ctxFg.restore();

        // draw from and to text
        ctxFg.setFill(Color.WHITE);
        ctxFg.setFont(Font.font("Open Sans", height * 0.1));
        ctxFg.setTextBaseline(VPos.BOTTOM);
        ctxFg.setTextAlign(TextAlignment.LEFT);
        ctxFg.fillText(getSkinnable().getFrom(), 2, height - 2);
        ctxFg.setTextAlign(TextAlignment.RIGHT);
        ctxFg.fillText(getSkinnable().getTo(), width - 2, height -2);

        // draw title text
        if (getSkinnable().isTitleVisible()) {
            ctxFg.setTextBaseline(VPos.TOP);
            ctxFg.setTextAlign(TextAlignment.CENTER);
            ctxFg.fillText(getSkinnable().getSeries().getName(), width * 0.5, 2);
        }

        ctxFg.restore();
    }