var tooltipData = chartData[tooltipItem.index];
// Build default tooltip.
- var tooltip = this._cleanData(serieLabel) + ': ' + tooltipData;
+ var tooltip = [];
+
+ // Pie and doughnut charts does not have axis.
+ if (tooltipItem.xLabel == '' && tooltipItem.yLabel == '') {
+ var chartLabels = this._cleanData(this._chart.getLabels());
+ tooltip.push(chartLabels[tooltipItem.index]);
+ }
// Add series labels to the tooltip if any.
if (serieLabels !== null) {
- tooltip = this._cleanData(serieLabels[tooltipItem.index]);
+ tooltip.push(this._cleanData(serieLabels[tooltipItem.index]));
+ } else {
+ tooltip.push(this._cleanData(serieLabel) + ': ' + tooltipData);
}
return tooltip;