We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have written the following code to set the point that was clicked as Active element but it just doesn't work any suggestions
private onClick = ( event: ChartEvent, elements: ActiveElement[], chart: Chart, ) => { if (elements.length) { const element = elements[0]; const datasetIndex = element.datasetIndex; const dataIndex = element.index; const dataset = chart.data.datasets[datasetIndex]; const dataValue = dataset.data[dataIndex]; chart.setActiveElements([ { datasetIndex, index: dataIndex, }, ]); chart.tooltip?.setActiveElements( [ { datasetIndex, index: dataIndex, }, ], dataValue as Point, ); chart.update(); } };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have written the following code to set the point that was clicked as Active element but it just doesn't work any suggestions
The text was updated successfully, but these errors were encountered: