1 openerp.web_kanban_sparkline = function (instance) {
4 * Kanban widgets: Sparkline
8 instance.web_kanban.SparklineBarWidget = instance.web_kanban.AbstractField.extend({
9 className: "oe_sparkline_bar",
12 var title = this.$node.html() || this.field.string;
13 setTimeout(function () {
14 var value = _.pluck(self.field.value, 'value');
15 var tooltips = _.pluck(self.field.value, 'tooltip');
16 var sparkline_options = _.extend({
24 tooltipFormat: '{{offset:offset}} {{value}}',
25 tooltipValueLookups: {
29 self.$el.sparkline(value, sparkline_options);
30 self.$el.tooltip({'html': true, 'title': function(){return title}, 'placement': 'bottom', 'container': 'body'});
35 instance.web_kanban.fields_registry.add("sparkline_bar", "instance.web_kanban.SparklineBarWidget");