You must be logged in to post your query.
Home › Forums › StockChart Support › StockChart Async Data Load – strange/buggy events
Hi!
When stockchart is in async mode (navigator.dynamicUpdate=false) – just like in your demo (https://canvasjs.com/javascript-stockcharts/stockchart-async-data/) and zoomEnabled=false –
1.) if you change range using navigator slider, or range buttons, or inputFields (rangeChanged event is fired),
2.) and then (every time) you click anywhere in the chart area, there is new rangeChanged event fired (the same one as in 1. with the same source, minimum, maximum)
You can reproduce it your demo, if you log event in function rangeChanged(e).
So when I want to shift navigator slider programmatically it results in errors:
https://jsfiddle.net/2xq67rgb/3/
In this demo there are two bugs (but i think it’s the same source):
1.) After initialization, when you click on shiftData button, there is new (shifted) range computed -> slider range minimum and maximum set -> and new data loaded. When you click anywhere in chart area, there is uncaught Error (this.stockChart._rangeEventParameter is undefined).
2.) If you first change viewport range using navigator, range buttons or inputFields. Then click on shiftData few times – all work as expected. But then if you click anywhere in the chart area, there is same rangeChanged event fired -> and new data loaded with old range from previous event. And that is not desired behavior.
Thanks for reporting the use-cases. We will fix it in future versions.
—
Vishwas R
Team CanvasJS
Thank you for the information, I’ll wait for the new version. Keep up the good work!
We have just released StockChart v1.2 with a few bug fixes related to range events. Please refer to the release blog for more information. Do download the latest version from our download page and let us know your feedback.
—
Vishwas R
Team CanvasJS
Hi.
I am testing new version 1.2 (https://canvasjs.com/blog/10/19/chart-v3-2-stockchart-v1-2-ga/) where should be these erros fixed, but I still have issues.
First scenario:
https://jsfiddle.net/2xq67rgb/3/
1.) After Initialization, change the viewport range using navigator slider (or buttons, or inputFields).
2.) Click on shiftData button (few times).
3.) When you click anywhere in the chart area, there is wrong event fired (source: “navigator”, type: “rangeChanged”, and old/wrong minumum, maximum)
Second scenario:
https://jsfiddle.net/g7jfoxkq/2/
Here we have both rangeChanging Event handler for the chart (see “rangeChanging: onGraphRangeChanging” in the example) and also rangeChanged Event handler for the whole stockchart (see “rangeChanged: rangeChanged”).
1.) Change the viewport range using navigator slider (or buttons, or inputFields) or click on shiftData.
2.) When you click anywhere in the chart area, there is wrong event fired – same as in the first scenario. And there is another wrong event fired for the chart (type: “rangeChanging”, trigger: “zoom”). (See debug console in the example)
So there is “zoom” event fired (and also chart rerenders) even though there is zoom disabled for the stockchart.
Thank you for the help.
We have fixed bug related to range events being fired multiple times when slider or handle or range buttons clicked multiple times without changing the range. We will further improve it in our future versions to work properly irrespective of clicking any StockChart elements.
—
Vishwas R
Team CanvasJS
Hi.
Do you have any timeline for this bug fix? Thanks.
You must be logged in to reply to this topic.