You can use this solution:
lineChartData: Is your data source filled from your API
, So you must add the necessary data that you will use when you click.
public chartClicked(e: any): void {
if (e.active.length > 0) {
const chart = e.active[0]._chart;
const activePoints = chart.getElementAtEvent(e.event);
if ( activePoints.length > 0) {
const clickedElementIndex = activePoints[0]._index;
const label = chart.data.labels[clickedElementIndex];
console.log("serie from your dataset = " + activePoints[0]._model.datasetLabel);
console.log("dataset index = " + activePoints[0]._datasetIndex);
console.log("serie id from your data source = " + this.lineChartData[activePoints[0]._datasetIndex].labelId);
console.log("serie from your data source = " + this.lineChartData[activePoints[0]._datasetIndex].label);
console.log("label from your dataset = " + label);
}
}}