Skip to content

Commit 79773b7

Browse files
LeeLenaleeeJacco van den Berg
andauthored
Show correct title in multi series pie chart example (#11962)
Co-authored-by: Jacco van den Berg <jacco@jem-id.nl>
1 parent 36d9920 commit 79773b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/samples/other-charts/multi-series-pie.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ const config = {
7474
},
7575
tooltip: {
7676
callbacks: {
77-
label: function(context) {
78-
const labelIndex = (context.datasetIndex * 2) + context.dataIndex;
79-
return context.chart.data.labels[labelIndex] + ': ' + context.formattedValue;
77+
title: function(context) {
78+
const labelIndex = (context[0].datasetIndex * 2) + context[0].dataIndex;
79+
return context[0].chart.data.labels[labelIndex] + ': ' + context[0].formattedValue;
8080
}
8181
}
8282
}

0 commit comments

Comments
 (0)