[IMP] web_kanban_sparkline: don't show the value in the tooltip for the sparklines of type 'tristate'
bzr revid: qdp-launchpad@openerp.com-20140106131605-8lfp6dzpnl9vor09
This commit is contained in:
parent
a5f3084ac4
commit
5881686194
|
@ -14,6 +14,7 @@ instance.web_kanban.SparklineBarWidget = instance.web_kanban.AbstractField.exten
|
||||||
var value = _.pluck(self.field.value, 'value');
|
var value = _.pluck(self.field.value, 'value');
|
||||||
var tooltips = _.pluck(self.field.value, 'tooltip');
|
var tooltips = _.pluck(self.field.value, 'tooltip');
|
||||||
var suffix = self.options.tooltip_suffix || "";
|
var suffix = self.options.tooltip_suffix || "";
|
||||||
|
var tooltipFormat = self.options.type == 'tristate' && '{{offset:offset}}' + suffix || '{{offset:offset}} {{value:value}}' + suffix
|
||||||
var sparkline_options = _.extend({
|
var sparkline_options = _.extend({
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barWidth: 5,
|
barWidth: 5,
|
||||||
|
@ -21,7 +22,7 @@ instance.web_kanban.SparklineBarWidget = instance.web_kanban.AbstractField.exten
|
||||||
barWidth: 4,
|
barWidth: 4,
|
||||||
barSpacing: 1,
|
barSpacing: 1,
|
||||||
barColor: '#96d854',
|
barColor: '#96d854',
|
||||||
tooltipFormat: '{{offset:offset}} {{value}} ' + suffix,
|
tooltipFormat: tooltipFormat,
|
||||||
chartRangeMin: 0,
|
chartRangeMin: 0,
|
||||||
tooltipValueLookups: {
|
tooltipValueLookups: {
|
||||||
'offset': tooltips
|
'offset': tooltips
|
||||||
|
|
Loading…
Reference in New Issue