summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2015-11-02 09:44:35 +0100
committerGéry Debongnie <ged@odoo.com>2015-11-02 10:06:13 +0100
commitcd71fe6687ff92c9de2b26ca4f4bd593b92c2f44 (patch)
treeb54e640db07000d69b3708b3e5fc7bc48da6cbe7 /addons
parentf83cf7172e3e312231c209dde87df90014b0c402 (diff)
[FIX] web,survey: update graphs tooltip to new nvd3
with the update of nvd3/d3, the tooltip api was changed. This commit updates the 3 last places where we were using the tooltips.
Diffstat (limited to 'addons')
-rw-r--r--addons/survey/static/src/js/survey_result.js6
-rw-r--r--addons/web/static/src/js/views/form_widgets.js8
2 files changed, 9 insertions, 5 deletions
diff --git a/addons/survey/static/src/js/survey_result.js b/addons/survey/static/src/js/survey_result.js
index 8fdb794d567..8f8ca83efc9 100644
--- a/addons/survey/static/src/js/survey_result.js
+++ b/addons/survey/static/src/js/survey_result.js
@@ -50,12 +50,14 @@ if(!$('.js_surveyresult').length) {
//initialize discreteBar Chart
function init_bar_chart(){
- return nv.models.discreteBarChart()
+ var chart = nv.models.discreteBarChart()
.x(function(d) { return d.text; })
.y(function(d) { return d.count; })
.staggerLabels(true)
- .tooltips(false)
.showValues(true);
+
+ chart.tooltip.enabled(false);
+ return chart;
}
//initialize Pie Chart
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index c27c5982cbb..a68bbf730a0 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -738,9 +738,10 @@ var FieldPercentPie = common.AbstractField.extend({
.donut(true)
.showLegend(false)
.showLabels(false)
- .tooltips(false)
.color(['#7C7BAD','#DDD'])
.donutRatio(0.62);
+
+ chart.tooltip.enabled(false);
d3.select(svg)
.datum([{'x': 'value', 'y': value}, {'x': 'complement', 'y': 100 - value}])
@@ -778,12 +779,13 @@ var FieldBarChart = common.AbstractField.extend({
.width(width)
.height(height)
.margin({top: 0, right: 0, bottom: 0, left: 0})
- .tooltips(false)
.showValues(false)
.transition(350)
.showXAxis(false)
.showYAxis(false);
-
+
+ chart.tooltip.enabled(false);
+
d3.select(svg)
.datum([{key: 'values', values: value}])
.transition()