I am loading high charts through an ajax call which include parameters for creating the chart. So when I select values from a dropdown filter, the chart has to be different. Now I am using a load chart function, which will work on the onchange event of dropdown and it is like this :
function load_chart(stat, type, matrix){
chart_url = '<?=site_url('/admin/charts/index');?>';
$("#chart_wrap").load(chart_url);
}
I need to load charts to the same #chart_wrap
div. But then it is giving me this error :
uncaught exception: Highcharts error #16: www.highcharts/errors/16
and this is due to the fact that I have multiple charts in same page. So how can I fix this
I am loading high charts through an ajax call which include parameters for creating the chart. So when I select values from a dropdown filter, the chart has to be different. Now I am using a load chart function, which will work on the onchange event of dropdown and it is like this :
function load_chart(stat, type, matrix){
chart_url = '<?=site_url('/admin/charts/index');?>';
$("#chart_wrap").load(chart_url);
}
I need to load charts to the same #chart_wrap
div. But then it is giving me this error :
uncaught exception: Highcharts error #16: www.highcharts./errors/16
and this is due to the fact that I have multiple charts in same page. So how can I fix this
It's probably caused by including Highcharts library every time when you load chart. You should load Highcharts library only once, and then update chart.
So this page: chart_url = '<?=site_url('/admin/charts/index');?>';
shouldn't contain Highcharts' <script>
tag.
I was also receiving this error. After scouring the internet, I decided to try changing the call contained in my controller from View("SomeView", query) to PartialView("_someView", query). I renamed the actual view cshtml file from SomeView.cshtml to _someView.cshtml to follow remended naming conventions, and my error went away. That helped me, so I thought I would jot it down in case it helps somebody else out there.
In my case a page was not loaded correctly because of permission interceptor without me noticing...
The case was when i open operation from jqGrid , and it should show dialog for printing , the exception appears , and the reason is lack of permission to load resources correctly as descried in other answers so you have to have sharp eyes to know the exact problem according to your case.