I am currently using a chart.js pie chart to showcase some data. I have managed to display the required information in an alert box when a slice of the pie is clicked. However, I am now looking for a way to present this data in a dialog box instead.
'onClick': function(e) {
var activePoints = this.getElementsAtEvent(e);
var firstPoint = activePoints[0];
console.log(firstPoint)
var label = this.data.labels[firstPoint._index];
var list = this.data.list;
if (firstPoint!= undefined) {
for (let i = 0; i< list.length; i++) {
if (label === list[i].label) {
console.log(list[i].value);
alert(label + ":" + list[i].value);
<chart type="pie" [data]="data" [options]="options"></chart>