-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datetime axis doesn't respect "tickAmount" #89
Comments
Yes, as of now - the timescale ticks calculation is totally dependent on how many days/months is the gap and based on that - tickAmount is dynamically calculated discarding the option set by the user. One way is to set the xaxis: {
tickAmount: 6,
labels: {
formatter: function(val, timestamp) {
return moment(timestamp).format("DD MMM YYYY");
}
}
}, |
I see, is this documented somewhere? We could have a least a hint for that. |
You may try setting the xaxis: {
tickAmount: 6,
labels: {
formatter: function(val, timestamp) {
return moment(timestamp).format("MMM YY");
}
}
}, You may not get the labels exactly on the places you described (start/middle/end) but it will be close to it. |
can heat map have a datetime axis????? |
can we set the resolution, like we want to show data of 5 years then 3 years 1 month.. is there any option we can set it from chart |
@junedchhipa I was able to control the number of ticks by following your suggestion, however two things happened.
|
How can i show regular interval of time in y axis. for eg. 10:30 , 11:00, 11:30 . In my case its populating automically based on data passed to chart. Iam usig range bar chart. Please help me . |
What does your data look like ? If your timestamps are not populating your data following the half an hour trend you seem to want to produce, then unfortunately I don't think there's a way to display half an hour steps on your xaxis. However if your timestamps are 30 minute steps, then you need to do as described above :
|
Guys, I'm using vue.js, and you helped me too much with the comments. I'm pasting my piece of code, maybe it could help someone else. In my case, the user could "zoom in" the chart intervals. That's why I calculated the max and min and replaced the format to show hours.
|
Datetime axis doesn't respect any given "tickAmount"
Example:
https://codesandbox.io/s/w0rxpzwznw
The text was updated successfully, but these errors were encountered: