Chartjs-ChartJS Tooltip โ€“ Change Data Format Displayed

0๐Ÿ‘

 Instead of new date pass your input date , Tooltip will show with formatted date value.

var barOption = {
                    tooltips: {
                      callbacks: {
                          label: function(t, d) {
                          this.date=new Date();
                       let formated_date = this.datepipe.transform(this.date, 'dd/MM/yyy');
    return formated_date;
                         },
                      },
                    },
    }

Leave a comment