Skip to content
Snippets Groups Projects
Commit a552a74f authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[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
parent eca8a087
No related branches found
No related tags found
No related merge requests found
......@@ -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' });});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment