summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph/graph_renderer.js
diff options
context:
space:
mode:
authorFrancois Volral <fvo@odoo.com>2018-07-30 09:19:07 +0200
committerFrancois Volral <fvo@odoo.com>2018-08-10 17:21:17 +0200
commit6c68059a803f38376e4828a83856e41ae3432024 (patch)
tree69cc11b7bb4fc74b1f1b371d60e1ad5be782b9dc /addons/web/static/src/js/views/graph/graph_renderer.js
parent3d2ca8104e46721b5db319a2aeb0ee971cb009d7 (diff)
[FIX] web: Add a right margin to line chart
Before, the line chart was rendered with a right margin of 0 px meaning the right border of the graph was stucked against the right border of the screen cutting out the last x-axis label. This was uggly. This commit fix that situation by adding a right margin of 80 px.
Diffstat (limited to 'addons/web/static/src/js/views/graph/graph_renderer.js')
-rw-r--r--addons/web/static/src/js/views/graph/graph_renderer.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_renderer.js b/addons/web/static/src/js/views/graph/graph_renderer.js
index c1ab6276123..d58bf2fcdf6 100644
--- a/addons/web/static/src/js/views/graph/graph_renderer.js
+++ b/addons/web/static/src/js/views/graph/graph_renderer.js
@@ -357,11 +357,12 @@ return AbstractRenderer.extend({
var chart = nv.models.lineChart();
chart.options({
- margin: {left: 80, bottom: 100, top: 80, right: 0},
+ margin: {left: 80, bottom: 100, top: 80, right: 80},
useInteractiveGuideline: true,
showLegend: _.size(data) <= MAX_LEGEND_LENGTH,
showXAxis: true,
showYAxis: true,
+ wrapLabels: true,
});
chart.xAxis.tickValues(tickValues)
.tickFormat(tickFormat);