var chart = Highcharts.chart('container', {
chart: {
zoomType: 'xy'
},
title: {
text: '东京月平均天气数据'
},
subtitle: {
text: '数据来源: WorldClimate.com'
},
xAxis: [{
categories: [
'一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月'
],
crosshair: true,
offset: 40
}],
yAxis: [{ // Primary yAxis
labels: {
format: '{value}°C',
style: {
color: Highcharts.getOptions().colors[2]
}
},
title: {
text: '温度',
style: {
color: Highcharts.getOptions().colors[2]
}
},
opposite: true
}, { // Secondary yAxis
gridLineWidth: 0,
title: {
text: '降雨量',
style: {
color: Highcharts.getOptions().colors[0]
}
},
labels: {
format: '{value} mm',
style: {
color: Highcharts.getOptions().colors[0]
}
},
opposite: true
}, { // Tertiary yAxis
gridLineWidth: 0,
title: {
text: '海平面气压',
style: {
color: Highcharts.getOptions().colors[1]
}
},
labels: {
format: '{value} mb',
style: {
color: Highcharts.getOptions().colors[1]
}
},
opposite: true
}, {
title: {
text: '污染物浓度 (mm)'
}
}],
tooltip: {
shared: true
},
series: [{
name: '降雨量',
type: 'spline',
yAxis: 1,
data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
tooltip: {
valueSuffix: ' mm'
}
}, {
name: '海平面气压',
type: 'spline',
yAxis: 2,
data: [1016, 1016, 1015.9, 1015.5, 1012.3, 1009.5, 1009.6, 1010.2, 1013.1, 1016.9, 1018.2, 1016.7],
marker: {
enabled: false
},
dashStyle: 'shortdot',
tooltip: {
valueSuffix: ' mb'
}
}, {
name: '温度',
type: 'spline',
Axis: 3,
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
tooltip: {
valueSuffix: ' °C'
}
},{
name: '东京',
Axis: 4,
type: 'column',
data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}, {
name: '纽约',
Axis: 4,
type: 'column',
data: [83.6, 78.8, 98.5, 93.4, 106.0, 84.5, 105.0, 104.3, 91.2, 83.5, 106.6, 92.3]
}, {
name: '伦敦',
Axis: 4,
type: 'column',
data: [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 65.2, 59.3, 51.2]
}, {
name: '柏林',
Axis: 4,
type: 'column',
data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]
}, {
name: 'aa',
Axis: 4,
type: 'column',
data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]
},{
name: 'bb',
Axis: 4,
type: 'column',
data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]
},{
name: 'cc',
Axis: 4,
type: 'column',
data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]
},{
type: 'windbarb',
data: [
[9.8, 177.9],
[10.1, 177.2],
[11.3, 179.7],
[10.9, 175.5],
[9.3, 159.9],
[8.8, 159.6],
[7.8, 162.6],
[5.6, 186.2],
[6.8, 146.0],
[6.4, 139.9],
[3.1, 180.2],
[4.3, 177.6]
],
name: 'Wind',
color: Highcharts.getOptions().colors[1],
showInLegend: true,
tooltip: {
valueSuffix: ' m/s'
}
}]
});

引入js

highcharts.js
exporting.js
windbarb.js
highcharts-zh_CN.js

最新文章

  1. JavaScript随笔2
  2. 在C#代码中应用Log4Net(三)Log4Net中配置文件的解释
  3. diff 比较两个文件的差异
  4. iOS开发UI篇—无限轮播(循环利用)
  5. oracle 内外连接,左连接,右连接 区别
  6. dataTabel转成dataview插入列后排序
  7. Robotium Recorder的初试
  8. [转]SIP穿越NAT&FireWall解决方案
  9. 6.1.2Linux下Socket编程
  10. codeforce 230D Dijsktra
  11. HttpServletRequest对象方法的用法(转)
  12. Java数组的复制
  13. 数据结构 - trie
  14. zTree实现地市县三级级联Service接口实现
  15. session图片验证码,页面和请求是两个地址。android手机好用,iphone 失效。
  16. sublime 可能卡的原因
  17. 实验吧 web题writeup
  18. C++面向对象类的实例题目十二
  19. MySql笔记之数据表
  20. PMON使用手册

热门文章

  1. 多本Python极速入门最佳书籍,不可错过的Python学习资料!
  2. request response cookie session
  3. PTA 银行排队问题之单队列多窗口加VIP服务 队列+模拟
  4. hiho 1050 树的直径
  5. C语言高效编程的几招,你会了几招了?
  6. 匈牙利算法 - Luogu 1963 变换序列
  7. 了解CSS核心精髓(一)
  8. Leetcode8--->String to Integer(实现字符串到整数的转换)
  9. Leetcode 456.132模式
  10. Leetcode 435.无重叠区间