Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the pointers from the chart?

enter image description here

This is a simple UI I made to learn the charts API in JavaFX. The AreaChart looks great however, I was wondering if it is possible to hide the tiny dots that signify the plotted values ?

The reason is that as the dots come closer, when the value of X axis increases, they become smaller and harder to comprehend. Sometimes they overlap. In such a situation, the graph would be more legible without the dots.

like image 364
An SO User Avatar asked Dec 11 '13 09:12

An SO User


1 Answers

There is a method to hide the dots (or any other graphical representation of a x/y point).

    final LineChart<Number,Number> lineChart = 
            new LineChart<Number,Number>(xAxis,yAxis);
    //here be code...

    lineChart.setCreateSymbols(false); //hide dots
like image 85
denhackl Avatar answered Sep 28 '22 20:09

denhackl