[FIX] survey: improve bar chart visuals
This commit makes sure that graph result starts at 0 in survey results. Before the commit it would start at the lowest number of answers, which was not the best way to visualize survey result data. task-3389003 closes odoo/odoo#129488 X-original-commit: 8bde5f102bdbdf923c5c4d4cdd63bfdaadd7bf2b Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -153,6 +153,7 @@ publicWidget.registry.SurveyResultChart = publicWidget.Widget.extend({
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
precision: 0,
|
||||
},
|
||||
}],
|
||||
@@ -203,7 +204,8 @@ publicWidget.registry.SurveyResultChart = publicWidget.Widget.extend({
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
precision: 0,
|
||||
},
|
||||
}],
|
||||
},
|
||||
@@ -341,6 +343,7 @@ publicWidget.registry.SurveyResultChart = publicWidget.Widget.extend({
|
||||
display: false,
|
||||
},
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
precision: 0,
|
||||
callback: function (label) {
|
||||
return label + '%';
|
||||
@@ -348,7 +351,7 @@ publicWidget.registry.SurveyResultChart = publicWidget.Widget.extend({
|
||||
suggestedMin: 0,
|
||||
suggestedMax: 100,
|
||||
maxTicksLimit: 5,
|
||||
stepSize: 25
|
||||
stepSize: 25,
|
||||
},
|
||||
}],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user