云木one
2019-05-05 15:00在js文件中写了两遍一样的代码(改了id名称),在html中调用JS时只显示第二个id的图
onload = function(){
Highcharts.chart('twitterChart1', {
title: {
text: 'Solar Employment Growth by Sector, 2010-2016'
},
subtitle: {
text: 'Source: thesolarfoundation.com'
},
yAxis: {
title: {
text: 'Number of Employees'
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle'
},
plotOptions: {
series: {
label: {
connectorAllowed: false
},
pointStart: 2010
}
},
series: [ {
name: 'Other',
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
}],
responsive: {
rules: [{
condition: {
maxWidth: 500
},
chartOptions: {
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
}
}
}]
}
});};
这个是因为两次onload,只能调用最后一个吗?
- 点赞
- 回答
- 收藏
- 复制链接分享
2条回答
为你推荐
- 求助,大佬怎么让上边这2个图片都转动呢
- javascript
- 2个回答
- ajaxFileUpload 文件上传问题
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 0个回答
- extjs form提交问题帮忙解决谢谢了.
- ext
- javascript
- 0个回答
- 做了一个小时的面试题(没有过 希望大家帮忙答下 虽然很幼稚 毕竟每个人都是这么过来的吗 感激了!)
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 2个回答
- Ext.grid.GridPanel重用的问题
- ext
- javascript
- 0个回答
换一换