score:10

Accepted answer

you can customize the label in callback function.

tooltips: { 
          callbacks: {
                        label: function(tooltipitem, data) {
                            return "daily ticket sales: $ " + tooltipitem.ylabel;
                        },
                    }
            }

score:2

a bit late, but perhaps the answer by @leonf works great, didn't make it fully as i work with many datasets and great numbers, so if anyone needs it, here i left my code so the labels have the correct label and the formated value (i hope this helps someone):

var mychart = new chart(ctx, {
    type: 'line',
    data: {
        labels: _labels,
        datasets: [...]
    },
    options: {
        scales: {
            yaxes: [{
                ticks: {
                    beginatzero: true,
                    stacked: false,
                    callback: function (label, index, labels) {
                        return '$' + label / 1000000;
                    }
                },
                scalelabel: {
                    display: true,
                    labelstring: 'millones de pesos'
                }
            }]
        },
        tooltips: {
            callbacks: {
                label: function (tti, data) {
                    // here is the trick: the second argument has the dataset label
                    return '{0}: {1}'.format(data.datasets[tti.datasetindex].label, formatmoney(tti.ylabel));
                }
            }
        },
        title: {
            display: true,
            text: 'avance global'
        }
    }
});

i left also my functions for string.format:

string.prototype.format = string.prototype.format = function () {
    var args = arguments;
    return this.replace(/{(\d+)}/g, function (match, number) {
        return typeof args[number] != 'undefined' ? args[number] : match;
    });
};

and for formatmoney:

function formatnumber(num) {
    if (num == 'nan') return '-';
    if (num == 'infinity') return '∞';
    num = num.tostring().replace(/\$|\,/g, '');
    if (isnan(num))
        num = "0";
    sign = (num == (num = math.abs(num)));
    num = math.floor(num * 100 + 0.50000000001);
    cents = num % 100;
    num = math.floor(num / 100).tostring();
    if (cents < 10)
        cents = "0" + cents;
    for (var i = 0; i < math.floor((num.length - (1 + i)) / 3) ; i++)
        num = num.substring(0, num.length - (4 * i + 3)) + ',' + num.substring(num.length - (4 * i + 3));
    return (((sign) ? '' : '-') + num + '.' + cents);
}
function formatmoney(num) {
    return '$' + formatnumber(num);
}

score:33

scales: {
    xaxes: [{
      type: 'time',
      time: {
          tooltipformat:'mm/dd/yyyy', // <- here
          displayformats: {
             'millisecond':'hh:mm:ss',
             'second': 'hh:mm:ss',
             'minute': 'hh:mm:ss',
             'hour': 'hh:mm:ss',
             'day': 'hh:mm:ss',
             'week': 'hh:mm:ss',
             'month': 'hh:mm:ss',
             'quarter': 'hh:mm:ss',
             'year': 'hh:mm:ss',
          }
        }
    }]
}

Related Query

More Query from same tag