Home › forums › Using CanvasJS › Question regarding interval calculation
Tagged: interval, zoom
This topic contains 3 replies, has 2 voices, and was last updated by jerrygarciuh 1 year, 8 months ago.
I was reading https://canvasjs.com/docs/charts/chart-options/zoomenabled/
And in the comment on March 21, 2016 at 2:16 I found question “Is it possible to change the intervalType on zoom level?”
Support had replied with example http://jsfiddle.net/canvasjs/8e98Lej8/
I tried using this example to set custom formats and after some frustration I made copy of fiddle example where each of support’s interval calculations result in an alert: http://jsfiddle.net/8e98Lej8/1/
While e.trigger is found to be set to Zoom none of the conditions is ever true when zooming.
Am I failing to get this or is the example no longer valid?
Because of multiple X / Y axis support, all axis parameters in events like rangeChanging / rangeChanged have been changed to array from object (Since v1.8.5), refer this release-post for more info. Changing e.axisX to e.axisX should work fine in your case. Please check this updated jsfiddle.
We had missed out updating this jsfiddle. Thanks for bringing it to our notice, we have updated the jsfiddle accordingly.
Thank you so much! Y’all are fantastic!
Found one more example that needs same array index fix. Here is the updated, working version http://jsfiddle.net/mydmun2x/8/
BTW- client bought license so will post under their user if anything else comes up.
You must be logged in to reply to this topic.