Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/454.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何销毁highcharts对象_Javascript_Jquery_Highcharts - Fatal编程技术网

Javascript 如何销毁highcharts对象

Javascript 如何销毁highcharts对象,javascript,jquery,highcharts,Javascript,Jquery,Highcharts,当我打开包含两次以上highcharts的页面时,我遇到如下错误: Uncaught Highcharts error #16: www.highcharts.com/errors/16 未捕获的Highcharts错误#16:www.Highcharts.com/errors/16 详情如下: Highcharts Error #16 Highcharts already defined in the page This error happens the second t

当我打开包含两次以上highcharts的页面时,我遇到如下错误:

Uncaught Highcharts error #16: www.highcharts.com/errors/16 未捕获的Highcharts错误#16:www.Highcharts.com/errors/16 详情如下:

Highcharts Error #16 Highcharts already defined in the page This error happens the second time Highcharts or Highstock is loaded in the same page, so the Highcharts namespace is already defined. Keep in mind that the Highcharts.Chart constructor and all features of Highcharts are included in Highstock, so if you are running Chart and StockChart in combination, you only need to load the highstock.js file. 高位图表错误#16 已在页面中定义了Highcharts 此错误在第二次加载Highcharts或Highstock时发生 相同的页面,因此已定义Highcharts命名空间。(使)留在家里 注意Highcharts.Chart构造函数和Highcharts的所有功能 都包含在Highstock中,所以如果您运行的是Chart和StockChart 在组合中,您只需要加载highstock.js文件。 它告诉我highcharts对象已经存在。所以,当我重新打开带有highcharts的页面时,如何销毁该对象。 这是我的密码:

$(function(){ chart1 = new Highcharts.Chart({ chart: { renderTo: 'container1', type: 'column' }, title: { text: 'count' }, credits: { enabled: false }, xAxis: { categories: [ ], crosshair: true }, yAxis: { min: 0, title: { text: '商家个数' } }, tooltip: { headerFormat: '{point.key}', pointFormat: '{series.name}: ' + '{point.y} 个', footerFormat: '', shared: true, useHTML: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [ { name: 'count', data: } ] }); }); $(函数(){ 图表1=新的高点图表。图表({ 图表:{ renderTo:'container1', 类型:“列” }, 标题:{ 文本:“计数” }, 学分:{ 已启用:false }, xAxis:{ 类别:[], 十字准星:对 }, 亚克斯:{ 分:0,, 标题:{ 正文:'商家个数' } }, 工具提示:{ headerFormat:“{point.key}”, pointFormat:“{series.name}:”+ {point.y}个', 页脚格式:“”, 分享:是的, useHTML:true }, 打印选项:{ 专栏:{ 点填充:0.2, 边框宽度:0 } }, 系列:[ { 姓名:'计数', 数据: } ] }); });
任何帮助都将不胜感激。…

检查此链接可能会有所帮助。它似乎不起作用。…我认为您误解了错误。该错误意味着您加载了两次
highcharts.js
文件。这与创建图表无关。这可能会帮助您销毁highchart对象