Skip to content

Commit

Permalink
Show correct title in multi series pie chart example (#11962)
Browse files Browse the repository at this point in the history
Co-authored-by: Jacco van den Berg <jacco@jem-id.nl>
  • Loading branch information
LeeLenaleee and Jacco van den Berg authored Nov 21, 2024
1 parent 36d9920 commit 79773b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/samples/other-charts/multi-series-pie.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const config = {
},
tooltip: {
callbacks: {
label: function(context) {
const labelIndex = (context.datasetIndex * 2) + context.dataIndex;
return context.chart.data.labels[labelIndex] + ': ' + context.formattedValue;
title: function(context) {
const labelIndex = (context[0].datasetIndex * 2) + context[0].dataIndex;
return context[0].chart.data.labels[labelIndex] + ': ' + context[0].formattedValue;
}
}
}
Expand Down

0 comments on commit 79773b7

Please sign in to comment.