如何更改凹坑中的y轴位置

时间:2016-08-11 10:24:28

标签: html css d3.js data-visualization dimple.js

这是我现在的情节: enter image description here

以下是代码:

<div ng-app="myApp" ng-controller="myCtrl">
<input type="date" ng-model="fromDate" />
<input type="date" ng-model="toDate" />

<input type="number" ng-value="difference(fromDate, toDate)"> 
</div>

<script>
var app = angular.module('myApp', []);

app.controller('myCtrl', function($scope) {
   $scope.difference = function (fromDate, toDate) {
        if (fromDate && toDate) {
            return Math.round(Math.abs((new Date(fromDate).getTime() - new Date(toDate).getTime())/(24*60*60*1000)));
        }
   }
});
</script>

y轴看起来很烦人,那怎么能把它放在我的图表左侧?

0 个答案:

没有答案