2017-01-30 100 views
0

我使用图表js绘制了线图。它工作得很好,但问题是它会从0开始所有行,但我需要在图形行和轴行之间填充一些内容。我需要一个像如何在图表js中添加X轴填充线图

enter image description here

我需要这种差距(红色标记的)。我怎么能做到这一点?

+0

请提供您的代码,请 – Mistalis

+0

代码与此类似https://jsfiddle.net/vz4qhqpw/154/ – Arunkumar

回答

0

the fiddle你提供一个取巧的办法将是$scope.labels$scope.data一个null推在第一位置:

$scope.labels.unshift(''); 
$scope.data[0].unshift(null); 
$scope.data[1].unshift(null); 

一开始你有:

enter image description here

,你会有:

enter image description here