Generate chart model from the start

This commit is contained in:
Joe Fiorini
2015-01-29 14:01:20 -05:00
parent 98a4f195c2
commit f1f15f1670

View File

@@ -10,7 +10,7 @@ angular.module('DashboardGraphs')
function link(scope, element, attr) {
var html;
var url;
var job_status_chart;
var job_status_chart = nv.models.lineChart();
var cleanup = angular.noop;
scope.period="month";
@@ -57,7 +57,7 @@ angular.module('DashboardGraphs')
return series;
});
job_status_chart = nv.models.lineChart()
job_status_chart
.margin({top: 5, right: 75, bottom: 40, left: 85}) //Adjust chart margins to give the x-axis some breathing room.
.x(function(d,i) { return i; })
.useInteractiveGuideline(true) //We want nice looking tooltips and a guideline!