projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed4fdc5
)
[IMP] incline the x-axis text by 15 degree when there are too many bars to display...
author
Gery Debongnie
<ged@openerp.com>
Fri, 27 Dec 2013 14:28:14 +0000
(15:28 +0100)
committer
Gery Debongnie
<ged@openerp.com>
Fri, 27 Dec 2013 14:28:14 +0000
(15:28 +0100)
bzr revid: ged@openerp.com-
20131227142814
-8ktqqxlthfa5hxe8
addons/web_graph/static/src/js/graph.js
patch
|
blob
|
history
diff --git
a/addons/web_graph/static/src/js/graph.js
b/addons/web_graph/static/src/js/graph.js
index
3a6d5e8
..
33d17e2
100644
(file)
--- a/
addons/web_graph/static/src/js/graph.js
+++ b/
addons/web_graph/static/src/js/graph.js
@@
-578,9
+578,15
@@
instance.web_graph.Graph = instance.web.Widget.extend({
var chart = nv.models.multiBarChart()
.width(self.width)
.height(self.height)
+ .reduceXTicks(false)
.stacked(self.bar_ui === 'stack')
.staggerLabels(true);
+ if (self.width / data[0].values.length < 100) {
+ chart.rotateLabels(-15);
+ chart.reduceXTicks(true);
+ chart.margin({bottom:40});
+ }
if (dim_x === 1 && dim_y === 0) { chart.showControls(false); }
d3.select(self.svg)