Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Chart Setting X Axis Date Data

Valon Cross
5 years ago Apr 05, 2018 6:28am
Guillermo Alvarez
5 years ago Apr 05, 2018 7:02am
Valon Cross
5 years ago Apr 06, 2018 3:03am
Peter Pan
4 years ago Jul 30, 2018 2:40pm
Guillermo Alvarez
4 years ago Jul 31, 2018 2:13pm

Hi,

The underlying charting library has some logic for the placements of the ticks in XAxis depending on the density of the data and the size of the chart.

You can override those calculations and set your own desired tick interval using XAxis#setTickInterval

Remember that datetime axes are based on milliseconds, so for example an interval of one day is expressed as 24 * 3600 * 1000