Conversation
|
I updated it to use the new ChartClickArgs. Now you can get the label name and index. So now it looks more like this: <PieChart @ref="pieChart" Width="500" OnClick="Clicked" />
@code{
// Other stuff
private void Clicked(ChartClickArgs args){
Console.WriteLine($"Clicked on: {args.LabelName} with index {args.Index}");
}
} |
|
@yannikHoeflich Thank you for your time and the pull request. I'll take care of it. |
|
tried your fork and got this error when trying the bar chart Uncaught TypeError: can't access property "invokeMethodAsync", dotNetHelper is undefined |
|
Sorry for the late response. I will take a look at it. |
|
Sorry, I forgot to do some changes at the other charts. That should fix it |
|
The OnClick event stops firing after calling UpdateAsync. Check out the Pie Graph Demo1, after clicking Ransomize data and clicking on a a segment, there is no update to the segment clicked text. |
This PR adds an OnClick attribute for all charts here is an example for a pie chart:
The parameter for the event is the label name, sadly there is not really a better option.