You must be logged in to post your query.
Home › Forums › Chart Support › Issue with iOS and CanvasJS, or my AJAX Calls?
Tagged: iOS Ajax Asp.Net RazorPages
I’m developing a proof of concept application using ASP.Net Razor Pages and CanvasJS. Users will require access the application via desktop and mobile. The CanvasJS Charts appear to work well on desktop web browsers, e.g. Edge, Chrome etc.
However, the performance of the CanvasJS charts when using iOS on either an iPhone or iPad is unreliable. The charts sometimes appear, and sometimes don’t. Even after a page refresh, the charts still are unlikely to appear. It can take up to 10 refreshes of the page before the CanvasJS chart will pear. Other times, they will appear on the initial page load. Very strange, but not good for users.
I’ve provided a link to Google Drive where a sample of the application can be downloaded.
You’ll notice that there are 2 AJAX calls for data, one to help plot the data points, the other to plot the stripe lines.
I’m not sure if my approach here is best practice and I’m happy to amend if that could improve the performance of the charts on iOS.
Any feedback is much appreciated.
We are unable to reproduce the issue at our end, it seems to work fine across iPad & iPhone. However, we suggest you to create chart instance once and update add datapoints in AJAX call instead of creating new chart instance for every datapoint. Also, instead of setting striplines properties using set method, we suggest you to update it through options and call render method once after updating all the options. Please take a look at this updated sample project for complete working code.
If the issue still persists, kindly share us more details like iOS version and the device in which you are facing issue so that we can try it out at our end to understand the scenario better and help you out.
Thank you for your reply and amendments. I’ll give these a try and monitor the performance using iOS.
You must be logged in to reply to this topic. Login/Register