diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-12-21 16:35:09 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2017-08-23 08:44:12 +0200 |
| commit | 388e258ce8c2a4fbd5e2ec5ec746bb91ca48d97f (patch) | |
| tree | 9e6b6eb8726bbf69bc4345fd79858727468deccb /addons/web/static/src/js/views | |
| parent | 5f7030fc446c30f7996b32c9ffed006882a31d42 (diff) | |
[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
Diffstat (limited to 'addons/web/static/src/js/views')
| -rw-r--r-- | addons/web/static/src/js/views/graph_widget.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/graph_widget.js b/addons/web/static/src/js/views/graph_widget.js index db6418fd15a..2aa98965329 100644 --- a/addons/web/static/src/js/views/graph_widget.js +++ b/addons/web/static/src/js/views/graph_widget.js @@ -166,7 +166,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, @@ -175,7 +175,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' });}); |
