Replies: 2 comments 2 replies
-
Your commented out time-scale config is in chart.js v2 format, that is why it does not work. The With time scale, the min/max are in the same format as data, or in timestamps (=number, microseconds since 1.1.1970) |
Beta Was this translation helpful? Give feedback.
2 replies
-
I changed back to strings, created the label array, removed moment and the moment adapter. Category is working correctly now. Thank you so much! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been through the issues, searched many posts, and have tried many different configurations and still cannot get the chart to start with a specific subset range and then allow the user to pan or zoom from there.
The data set has a date and a number and has a few years of data (1526 entries). My goal is to start with only the last 180 entries (6 months) and allow the user to pan to the left for older entries or zoom on the current data displayed. Zooming and panning work fine if there is no attempt to try so start zoomed in.
Is there a guide and/or example that clearly explains what the configuration and value and value types need to be?
I don't understand the impact and effect of min with the zoom plugin on the min in the axis options.
If this only works with a time series, I have tried configuring it that way but when I check the chartPerDay.scales.x.type it is set to 'category'. It is unclear to me what chartjs expects to set up for a time series.
The config here has some commented settings to show some of the values I have tried.
Sample data.
With the
suggestedMin: "2021-02-07"
the label is changed on the first tick but the data is still from the first data point and then returns to 2017.With
scales: {x: min: 1347, max: 1526,}}
the chart starts with the first data point from the full set and is completely zoomed outAny help is greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions