You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created a stacked barchart with several datasets (Information, Error, Warning), see screenshot below. When the user clicks a bar, I need to know which dataset the portion of the bar that they clicked belong to. In my case, if they clicked a collection of information, errors or warnings. In my function where I'm handling the ChartMouseEvent, I don't seem to be getting this information, instead it always gives me the first dataset (Information), regardless of which part of the bar the user clicked.
Which Blazor project type is your bug related to?
Client-Side
Which charts does this bug apply to?
BarChart with several datasets
To Reproduce
Steps to reproduce the behavior:
Using this version of ChartJSBlazor '2.0.2'.
Create a bar chart with several datasets and connect the OnClick event to a function in the BarOptions:
Read information from the _model property in the function where the click is being handled:
The _model property contains information from the first dataset, even though another one was clicked:
I expect to be able to find information on which dataset the portion of the bar that was clicked belong to.
Screenshots
Additional context / logging
Add any additional context about the problem here.
// Put your error log here
Code example
Please provide full code examples below where possible to make it easier for the developers to check your issues.
Please also add the working JavaScript equivalent so we can see what you were trying to achieve.
Describe the bug
I've created a stacked barchart with several datasets (Information, Error, Warning), see screenshot below. When the user clicks a bar, I need to know which dataset the portion of the bar that they clicked belong to. In my case, if they clicked a collection of information, errors or warnings. In my function where I'm handling the ChartMouseEvent, I don't seem to be getting this information, instead it always gives me the first dataset (Information), regardless of which part of the bar the user clicked.
Which Blazor project type is your bug related to?
Which charts does this bug apply to?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to be able to find information on which dataset the portion of the bar that was clicked belong to.
Screenshots
Additional context / logging
Add any additional context about the problem here.
Code example
Please provide full code examples below where possible to make it easier for the developers to check your issues.
Please also add the working JavaScript equivalent so we can see what you were trying to achieve.
// Put your JavaScript code here
The text was updated successfully, but these errors were encountered: