From 4b652ebe8afe05ffdce709c5e85180a1f47d68c1 Mon Sep 17 00:00:00 2001 From: Hiral Bhavsar Date: Mon, 17 Dec 2018 12:54:29 +0000 Subject: [IMP] web: properly display min and max abs when less that 3 abs. In graph line mode, min and max abs are displayed beyond the screen when there are less than 3 abs. This is happening because nvd3 fixes their text-anchor to 'middle'. The present commit fixes correctly their text-anchors to start and end respectively by using the '!important' rule (it seems difficult to do otherwise). Co-authored-by: Mohammed Shekha Related to Task: 1917958 --- addons/web/static/src/js/views/graph/graph_renderer.js | 4 ---- 1 file changed, 4 deletions(-) (limited to 'addons/web/static/src/js') 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 358426c86b9..2771159ab19 100644 --- a/addons/web/static/src/js/views/graph/graph_renderer.js +++ b/addons/web/static/src/js/views/graph/graph_renderer.js @@ -451,10 +451,6 @@ return AbstractRenderer.extend({ // of the tiny margins. if (ticksLabels.length > 3) { $svgContainer.find('svg .nv-x g.nv-axisMaxMin-x > text').hide(); - } else { - // Since the graph is on full container have first and last label in the container - $svgContainer.find('svg .nv-x g.nv-axisMin-x > text').css({'text-anchor': 'start'}); - $svgContainer.find('svg .nv-x g.nv-axisMax-x > text').css({'text-anchor': 'end'}); } return chart; -- cgit v1.2.3