'chartjs time axis change functionality
The horizontal axis in my chartjs line graph shows time. Currently the time axis is just a series of months in the style of "Jan 21","Feb 21","Mar 21" etc. This looks fine when looking over the period of a year or 2, but I am building the graph such that users should be able to change the number of years. The users should be able to shift between a vew with 1 year, 3 years or 10 years. When I shift to a longer time period it should be nice if the period labelling switched to show full years instead. Does there exist some kind of nice date formatting functionality that can figure out if months or years are more appropriate to view and shift automatically?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
