[英]highcharts display hour minute on x-axis
请帮助我,我需要使用highchart显示3分钟的图表,并显示几分钟。
请看截图
非常感谢
您可以使用数据扩展下面的代码
的HTML
<div id="container" style="height: 400px"></div>
JS
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
defaultSeriesType: 'line',
marginRight: 130,
marginBottom: 25
},
title: {
text: 'Highcharts',
x: -20 //center
},
subtitle: {
text: ' ',
x: -20
},
xAxis: {
categories: ['1', '2', '3', '4', '5', '6',
'7', '8', '9', '10', '11', '12']
},
yAxis: {
title: {
text: ' '
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'}]
},
tooltip: {
formatter: function() {
return '<b>' + this.series.name + '</b><br/>' + this.x + ': ' + this.y;
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [
{
name: 'Time',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]}]
});
这是jsfiddle文件http://jsfiddle.net/CA2cT/9/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.