mirror of
https://github.com/ansible/awx.git
synced 2026-04-05 01:59:25 -02:30
Generate chart model from the start
This commit is contained in:
@@ -10,7 +10,7 @@ angular.module('DashboardGraphs')
|
|||||||
function link(scope, element, attr) {
|
function link(scope, element, attr) {
|
||||||
var html;
|
var html;
|
||||||
var url;
|
var url;
|
||||||
var job_status_chart;
|
var job_status_chart = nv.models.lineChart();
|
||||||
var cleanup = angular.noop;
|
var cleanup = angular.noop;
|
||||||
|
|
||||||
scope.period="month";
|
scope.period="month";
|
||||||
@@ -57,13 +57,13 @@ angular.module('DashboardGraphs')
|
|||||||
return series;
|
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.
|
.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; })
|
.x(function(d,i) { return i; })
|
||||||
.useInteractiveGuideline(true) //We want nice looking tooltips and a guideline!
|
.useInteractiveGuideline(true) //We want nice looking tooltips and a guideline!
|
||||||
.showLegend(true) //Show the legend, allowing users to turn on/off line series.
|
.showLegend(true) //Show the legend, allowing users to turn on/off line series.
|
||||||
.showYAxis(true) //Show the y-axis
|
.showYAxis(true) //Show the y-axis
|
||||||
.showXAxis(true); //Show the x-axis
|
.showXAxis(true); //Show the x-axis
|
||||||
|
|
||||||
|
|
||||||
var width = $('.graph-container').width(); // nv.utils.windowSize().width/3,
|
var width = $('.graph-container').width(); // nv.utils.windowSize().width/3,
|
||||||
|
|||||||
Reference in New Issue
Block a user