标签: javascript jquery angularjs html5 chart.js
我使用图表js绘制了一个折线图。它运作良好,但问题是它将从0开始所有行,但我需要在图线和轴线之间进行一些填充。我需要像
我需要这个差距(红色标记)。我怎样才能实现这个目标?
答案 0 :(得分:0)
从您提供的the fiddle开始,一个棘手的方法是将$scope.labels和$scope.data null推入第一位:
$scope.labels
$scope.data
null
$scope.labels.unshift(''); $scope.data[0].unshift(null); $scope.data[1].unshift(null);
你有一个开始:
你将拥有: