云木one
2019-05-05 15:47js文件中,用了两个onload,第一个id无法调用,应该咋改才能两个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 = function(){
Highcharts.chart('twitterChart2', {
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'
}
}
}]
}
});};
- 点赞
- 回答
- 收藏
- 复制链接分享
2条回答
为你推荐
- 如何在javascript中调用c:foreach中值进行计算
- html5
- java
- javascript
- 1个回答
- 如何在不跳过的情况下从Javascript页面获取多个文件上传到服务器?
- javascript
- php
- 1个回答
- 使用javascript和引用ID在php循环中的多个谷歌地图
- html
- javascript
- php
- 1个回答
- 用JS写了一个小计算器,带时钟和一个载入的弹窗。然后为什么点击计算button结果显示一下就没了。
- html5
- javascript
- 2个回答
- JQuery.load 加载另外一个页面 不执行 ueditor的代码高亮
- javascript
- ajax
- jquery
- 2个回答
换一换