$(function () {
$('#container').highcharts({
chart: {
type: 'spline',//光滑线段 即曲线
inverted: true //反轴标志
},
title: {
text: 'Atmosphere Temperature by Altitude'
},
subtitle: {
text: 'According to the Standard Atmosphere Model'
},
xAxis: {
reversed: false,//x轴坐标反转 现在的x轴为纵向
title: {
enabled: true,
text: 'Altitude'
},
labels: {
formatter: function() {
return this.value +'km';
}
},
maxPadding: 0.05, //最大填充
showLastLabel: true //显示最后一个坐标值
},
yAxis: {
title: {
text: 'Temperature'
},
labels: {
formatter: function() {
return this.value + '°';
}
},
lineWidth: 2 //y坐标轴宽度
},
legend: {
enabled: false
},
tooltip: {
headerFormat: '<b>{series.name}</b><br/>', //头部信息
pointFormat: '{point.x} km: {point.y}°C' //具体信息
},
plotOptions: {
spline: {
marker: {
enable: false //根据鼠标位置自动定位到最近节点
}
}
},
series: [{
name: 'Temperature',
data: [[0, 15], [10, -50], [20, -56.5], [30, -46.5], [40, -22.1],
[50, -2.5], [60, -27.7], [70, -55.7], [80, -76.5]]
}]
});
});
$('#container').highcharts({
chart: {
type: 'spline',//光滑线段 即曲线
inverted: true //反轴标志
},
title: {
text: 'Atmosphere Temperature by Altitude'
},
subtitle: {
text: 'According to the Standard Atmosphere Model'
},
xAxis: {
reversed: false,//x轴坐标反转 现在的x轴为纵向
title: {
enabled: true,
text: 'Altitude'
},
labels: {
formatter: function() {
return this.value +'km';
}
},
maxPadding: 0.05, //最大填充
showLastLabel: true //显示最后一个坐标值
},
yAxis: {
title: {
text: 'Temperature'
},
labels: {
formatter: function() {
return this.value + '°';
}
},
lineWidth: 2 //y坐标轴宽度
},
legend: {
enabled: false
},
tooltip: {
headerFormat: '<b>{series.name}</b><br/>', //头部信息
pointFormat: '{point.x} km: {point.y}°C' //具体信息
},
plotOptions: {
spline: {
marker: {
enable: false //根据鼠标位置自动定位到最近节点
}
}
},
series: [{
name: 'Temperature',
data: [[0, 15], [10, -50], [20, -56.5], [30, -46.5], [40, -22.1],
[50, -2.5], [60, -27.7], [70, -55.7], [80, -76.5]]
}]
});
});