Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Problems with timeline and dots on line
Hi,
I am using Vaadin Charts and it is working quite fine. But I notice, when I use the option timeline=true on a Line-Chart, that the dots on the line ( which marks the points) will not be drawn? Is it an Bug or do I have to add something.
Greetings
Andre
Hello Andre,
I noticed the same thing. I found the following workaround. Hopefully it is an approach that you can use as well. Using the following code the dots are not drawn:
DataSeries lineData = randomWalk(1000);
Chart line = new Chart();
line.setTimeline(true);
Configuration lineConf = line.getConfiguration();
lineConf.setTitle("Line Chart");
lineConf.getChart().setType(ChartType.LINE);
lineConf.getLegend().setEnabled(false);
lineConf.addSeries(lineData);
However, if you use this code the dots are shown once you zoom in tight enough on the graph.
DataSeries lineData = randomWalk(1000);
Chart line = new Chart();
line.setTimeline(false);
Configuration lineConf = line.getConfiguration();
lineConf.setTitle("Line Chart");
Navigator navigator = lineConf.getNavigator();
navigator.setEnabled(true);
lineConf.getChart().setType(ChartType.LINE);
lineConf.getLegend().setEnabled(false);
lineConf.addSeries(lineData);
Btw. I use the following method to create my data:
private DataSeries randomWalk(int length) {
length = Math.abs(length);
Random random = new Random();
int current = 0;
DataSeries data = new DataSeries();
DataSeriesItem item = new DataSeriesItem();
item.setY(current);
data.add(item);
for (int i = 1; i < length; i++) {
int randomNumber = random.nextInt();
if (randomNumber < 0) {
current--;
} else {
current++;
}
item = new DataSeriesItem();
item.setY(current);
data.add(item);
}
return data;
}
Good luck,
Henrik
Sry, for the late answer, was working on other stuff. I will try it when I am back at the project. Thanks for your feedback.