From 951cdf2e1ccce6f352f692b88fb024844f964501 Mon Sep 17 00:00:00 2001 From: Benjamin <Benjamin@MBP-de-Benj.(none)> Date: Wed, 6 Sep 2017 17:19:12 +0200 Subject: [PATCH] =?UTF-8?q?label=20chart=20%=20->=20K=E2=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/src/js/dashboard_year.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/static/src/js/dashboard_year.js b/static/src/js/dashboard_year.js index c20d621..5172589 100644 --- a/static/src/js/dashboard_year.js +++ b/static/src/js/dashboard_year.js @@ -131,10 +131,10 @@ odoo.define('lefilament_tdb.dashboard_year', function (require) { this.ctx = this.$el.find('#target')[0].getContext('2d'); var dataset_stacked = [ - { label: 'Facturé', data: [this.pfact], backgroundColor: '#8ED8A2', }, - { label: 'Commandes', data: [this.pcomm], backgroundColor: '#F6DCA2', }, - { label: 'Gagné', data: [this.ppipe_win], backgroundColor: '#F6CCA2', }, - { label: 'Pipe', data: [this.ppipe_to_win], backgroundColor: '#F6ACA2', }, + { label: 'Facturé', data: [this.pfact2], backgroundColor: '#8ED8A2', }, + { label: 'Commandes', data: [this.pcomm2], backgroundColor: '#F6DCA2', }, + { label: 'Gagné', data: [this.ppipe2_win], backgroundColor: '#F6CCA2', }, + { label: 'Pipe', data: [this.ppipe2_to_win], backgroundColor: '#F6ACA2', }, { label: 'To Do', data: [this.ptarg], backgroundColor: '#eee', }]; var label = 'Année ' + moment(Date.now()).format('YYYY'); @@ -170,6 +170,11 @@ odoo.define('lefilament_tdb.dashboard_year', function (require) { titleFontStyle: 'normal', titleFontColor: '#999', bodyFontColor: '#777', + callbacks: { + label: function(tooltipItems, data) { + return (tooltipItems.xLabel / 1000).toLocaleString('fr', { maximumFractionDigits: 2 }) + ' K€'; + } + } }, responsive: true, } -- GitLab