[FIX] web: rotate graph label

When there are too many labels to display on the x-axis, they overlap
and it simply becomes unreadable. By slightly rotating them, this can be
avoided in most cases.

opw-697625
opw-697626
This commit is contained in:
Nicolas Martinelli
2016-12-22 10:06:19 +01:00
parent eca8a08710
commit a552a74f4f
@@ -168,7 +168,7 @@ return Widget.extend({
var chart = nv.models.multiBarChart();
var maxVal = _.max(values, function(v) {return v.y})
chart.options({
margin: {left: 12 * String(maxVal && maxVal.y || 10000000).length},
margin: {left: 12 * String(maxVal && maxVal.y || 10000000).length, bottom: 60},
delay: 250,
transition: 10,
showLegend: _.size(data) <= MAX_LEGEND_LENGTH,
@@ -177,7 +177,7 @@ return Widget.extend({
rightAlignYAxis: false,
stacked: this.stacked,
reduceXTicks: false,
// rotateLabels: 40,
rotateLabels: -20,
showControls: (this.groupbys.length > 1)
});
chart.yAxis.tickFormat(function(d) { return formats.format_value(d, { type : 'float' });});