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.
custumize tooltip in chart
I have the distance vs time chart in my project and I want to show speed on tooltip by calculating the speed.how can I do this.? any operator works in tooltip string? I have to show the distance/time(formula) value on tooltip
Hi,
have you looked at the Charts demos? A lot of the examples there on how to use different types of Tooltips. The details depend on your data, but in a simple scenario you should be able to do something like
Tooltip tooltip = new Tooltip();
tooltip.setFormatter("'Speed:' + (this.y / this.x)");
chart.getConfiguration().setTooltip(tooltip);
Hope this helps!
Olli Tietäväinen
Vaadin Developer
Addenum: Take a look at the Highcharts API for the Tooltip formatter if you want to see what's available for you in the formatter function.