[whitespace,view/graph][xs]: fix up whitespace in view.graph.js.
This commit is contained in:
@@ -118,26 +118,27 @@ my.Graph = Backbone.View.extend({
|
|||||||
return getFormattedX(x);
|
return getFormattedX(x);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// infoboxes on mouse hover on points/bars etc
|
||||||
var trackFormatter = function (obj) {
|
var trackFormatter = function (obj) {
|
||||||
var x = obj.x;
|
var x = obj.x;
|
||||||
var y = obj.y;
|
var y = obj.y;
|
||||||
// it's horizontal so we have to flip
|
// it's horizontal so we have to flip
|
||||||
if (self.state.attributes.graphType === 'bars') {
|
if (self.state.attributes.graphType === 'bars') {
|
||||||
var _tmp = x;
|
var _tmp = x;
|
||||||
x = y;
|
x = y;
|
||||||
y = _tmp;
|
y = _tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
x = getFormattedX(x);
|
x = getFormattedX(x);
|
||||||
|
|
||||||
var content = _.template('<%= group %> = <%= x %>, <%= series %> = <%= y %>', {
|
var content = _.template('<%= group %> = <%= x %>, <%= series %> = <%= y %>', {
|
||||||
group: self.state.attributes.group,
|
group: self.state.attributes.group,
|
||||||
x: x,
|
x: x,
|
||||||
series: obj.series.label,
|
series: obj.series.label,
|
||||||
y: y
|
y: y
|
||||||
});
|
});
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
};
|
};
|
||||||
|
|
||||||
var getFormattedX = function (x) {
|
var getFormattedX = function (x) {
|
||||||
@@ -208,18 +209,18 @@ my.Graph = Backbone.View.extend({
|
|||||||
xaxis: yaxis,
|
xaxis: yaxis,
|
||||||
yaxis: xaxis,
|
yaxis: xaxis,
|
||||||
mouse: {
|
mouse: {
|
||||||
track: true,
|
track: true,
|
||||||
relative: true,
|
relative: true,
|
||||||
trackFormatter: trackFormatter,
|
trackFormatter: trackFormatter,
|
||||||
fillColor: '#FFFFFF',
|
fillColor: '#FFFFFF',
|
||||||
fillOpacity: 0.3,
|
fillOpacity: 0.3,
|
||||||
position: 'e'
|
position: 'e'
|
||||||
},
|
},
|
||||||
bars: {
|
bars: {
|
||||||
show: true,
|
show: true,
|
||||||
horizontal: true,
|
horizontal: true,
|
||||||
shadowSize: 0,
|
shadowSize: 0,
|
||||||
barWidth: 0.8
|
barWidth: 0.8
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
|
|||||||
Reference in New Issue
Block a user