Commit b15c855c authored by Savorboard's avatar Savorboard

modify axis color.

parent b355bf72
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
}; };
BaseGraph.prototype._initGraph = function (element, settings, xSettings, ySettings) { BaseGraph.prototype._initGraph = function (element, settings, xSettings, ySettings) {
console.log(1);
var graph = this._graph = new Rickshaw.Graph($.extend({ var graph = this._graph = new Rickshaw.Graph($.extend({
element: element, element: element,
width: $(element).innerWidth(), width: $(element).innerWidth(),
...@@ -81,6 +81,11 @@ ...@@ -81,6 +81,11 @@
graph: graph, graph: graph,
timeFixture: new Rickshaw.Fixtures.Time.Local() timeFixture: new Rickshaw.Fixtures.Time.Local()
}, xSettings)); }, xSettings));
var legend = new Rickshaw.Graph.Legend({
element: document.querySelector('#legend'),
graph: graph
});
} }
if (ySettings) { if (ySettings) {
...@@ -113,21 +118,18 @@ ...@@ -113,21 +118,18 @@
this._initGraph(element, { this._initGraph(element, {
renderer: 'bar', renderer: 'bar',
series: new Rickshaw.Series.FixedDuration([ series: new Rickshaw.Series.FixedDuration([
{
name: pubFailedStr,
color: '#d9534f'
},
{ {
name: pubSucceededStr, name: pubSucceededStr,
color: '#6ACD65' color: '#33cc33'
}, },{
{
name: recFailedStr,
color: '#9c27b0'
},
{
name: recSucceededStr, name: recSucceededStr,
color: '#cddc39' color: '#3333cc'
},{
name: pubFailedStr,
color: '#ff3300'
},{
name: recFailedStr,
color: '#ff3399'
} }
], ],
undefined, undefined,
...@@ -180,23 +182,23 @@ ...@@ -180,23 +182,23 @@
this._initGraph(element, { this._initGraph(element, {
renderer: 'area', renderer: 'area',
series: [ series: [
{ {
color: '#d9534f', color: '#33cc33',
data: pubFailed,
name: pubFailedStr
}, {
color: '#6ACD65',
data: pubSucceeded, data: pubSucceeded,
name: pubSucceededStr name: pubSucceededStr
}, { },{
color: '#9c27b0', color: '#3333cc',
data: recFailed,
name: recFailedStr
}, {
color: '#cddc39',
data: recSucceeded, data: recSucceeded,
name: recSucceededStr name: recSucceededStr
} },{
color: '#ff3300',
data: pubFailed,
name: pubFailedStr
}, {
color: '#ff3399',
data: recFailed,
name: recFailedStr
}
] ]
}, {}, { ticksTreatment: 'glow' }); }, {}, { ticksTreatment: 'glow' });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment