Skip to content

Commit

Permalink
fix(chart): render selected segment after tooltip has rendered so it …
Browse files Browse the repository at this point in the history
…won't cut off the tooltip (#359)
  • Loading branch information
dtanp-rft authored Jun 13, 2022
1 parent c7ea8cb commit 62e37d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/elements/src/chart/__demo__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
text: 'Operating Segments of AAPL.O in 2014'
},
tooltips: {
enabled: false
enabled: true
}
}
};
Expand Down Expand Up @@ -579,7 +579,7 @@
text: 'Operating Segments of AAPL.O in 2020'
},
tooltips: {
enabled: false
enabled: true
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const plugins: Chart.PluginServiceRegistrationOptions = {
const items = chart.getDatasetMeta(datasetIndex).data[selectedIndex];
chart.selected = items ? [items] : [];
},
afterDraw: function (chart: DoughnutChart & Selectable): void {
afterDatasetsDraw: function (chart: DoughnutChart & Selectable): void {
if (getPluginConfig(chart)) {
// Draw active element
// Note: use logic from chart.js - chart.js/src/elements/element.arc.js :draw()
Expand Down

0 comments on commit 62e37d5

Please sign in to comment.