Using php and and and ajax call to update a MySQL query for a dashboard. This enables a user to click and pie segment and add that segment as a filter (to reduce the dataset).
I am able to re-render the pie in question to apply that as a filter but can’t re-render the other charts. Each chart is wrapped as below in jquery function.
$(function () {
var chart_country = new CanvasJS.Chart("Country".....
});
The onclick event generates a warning and fails to update other charts even though I call
chart_country.render();
chart_cdn.render();
chart_deviceos.render();
Warning in console:
jquery.min.js:2 jQuery.Deferred exception: Cannot read property ‘render’ of undefined TypeError: Cannot read property ‘render’ of undefined
at Object.<anonymous> (http://35.177.188.40/dashboard/web-analytics-overview.php:462:11)
at j (https://cdn.jsdelivr.net/jquery/latest/jquery.min.js:2:29999)
at k (https://cdn.jsdelivr.net/jquery/latest/jquery.min.js:2:30313) undefined
Any help/advice appreciated.
-
This topic was modified 5 years, 3 months ago by dhalket.