Add chart data point click event support#1276
Merged
Conversation
Introduced ChartClickEventArgs to encapsulate click event details. Added OnClick EventCallback to chart components (BarChart, LineChart, PieChart, etc.). Updated JS to wire up Chart.js onClick handler and invoke Blazor method with event data. Added demo for bar chart click event. Ensured proper disposal of DotNetObjectReference.
Contributor
Author
Added new "Click event" demo sections to the documentation pages for Doughnut, Line, Pie, Polar Area, Radar, and Scatter charts. Each demo shows how to handle chart element click events, display selected item details, and update the UI accordingly. New Razor demo components were created for each chart type, and documentation was updated to include and link to these interactive examples. This enhances guidance for handling user interactions in ChartJS-based Blazor charts.
Updated documentation for all chart components to include "Events" and "ChartClickEventArgs Properties" sections. Enhanced BlazorBootstrapChart property metadata with [AddedVersion], [DefaultValue], and [Description] attributes for Height, HeightUnit, Width, and WidthUnit. Improved remarks to clarify default values.
This was
linked to
issues
Mar 18, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.