如果点的周期超过特定限制,是否有切断图表线?
我的意思是,如果没有特定时间跨度的数据,我想切断图表。
在上图中,我想剪掉那张图表。
好吧,我正在.net 中为 highcharts 使用 DotNet.Highcharts 实现,但我可以在此处发布生成的 javascript 代码:
$(document).ready(function() {
Chart = new Highcharts.Chart({
chart: { renderTo:'Chart_container', className: 'chart', defaultSeriesType: 'line', marginBottom: 55, marginRight: 130, zoomType: 'xy' },
legend: { align: 'left', backgroundColor: '#FFFFFF', layout: 'vertical', verticalAlign: 'top', x: 20, y: 80 },
plotOptions: { area: { lineWidth: 1, marker: { enabled: false, states: { hover: { enabled: true, radius: 5 } } }, shadow: false, zIndex: 2 }, line: { allowPointSelect: true, dashStyle: 'solid', lineWidth: 1, marker: { enabled: false } }, spline: { marker: { enabled: false }, zIndex: 1000 } },
subtitle: { text: 'My chart', x: -20 },
title: { text: 'My Chart' },
xAxis: { gridLineWidth: 1, labels: { align: 'left', x: 3, y: -3 }, title: { text: 'My Chart' }, type: 'datetime' },
yAxis: { labels: { formatter: function() { return this.value ; } }, title: { text: 'Battery Voltage (V)' } },
series: [{ data: [['21/06/1392 09:02:32', 19.83], ['21/06/1392 11:02:32', 21.17], ['21/06/1392 13:02:31', 13.89], ['21/06/1392 15:02:31', 15.23]], name: 'Battery Voltage', type: 'line' }]
});
});