Closed gmlloves closed 1 year ago
Hello :)
Is your feature request related to a problem? Please describe. I need to know when a bar on the Bar Chart is clicked. I tried with OnChartClick and OnChartOver events but it does not write nothing to the console. Can you help me?
<Chart Config="_config1" @ref="_chart1" Class="mt-2 ml-2" Width="100px" OnChartClick="(i) => OnChartClick(i)" OnChartOver="() => OnChartOver()"></Chart> @code { ... private void OnChartOver() { Console.WriteLine("ChartOver"); } private void OnChartClick(int i) { Console.WriteLine("ChartClick " + i); } }
Describe the solution you'd like I'd like the OnChartClick and OnChartOver work (with their parameters) .
https://www.chartjs.org/docs/2.8.0/general/interactions/events.html --> onHover: Called when any of the events fire. Called in the context of the chart and passed the event and an array of active elements (bars, points, etc).
OnClick: Called if the event is of type 'mouseup' or 'click'. Called in the context of the chart and passed the event and an array of active elements.
Thank you.
Hey! I have just release a new version of the component and I added a better OnClickChart. More info on PureSorceCode.com
OnClickChart
Please let me know if it is working.
Hello, It woks very well :) Thank you!
Hello :)
Is your feature request related to a problem? Please describe. I need to know when a bar on the Bar Chart is clicked. I tried with OnChartClick and OnChartOver events but it does not write nothing to the console. Can you help me?
Describe the solution you'd like I'd like the OnChartClick and OnChartOver work (with their parameters) .
https://www.chartjs.org/docs/2.8.0/general/interactions/events.html --> onHover: Called when any of the events fire. Called in the context of the chart and passed the event and an array of active elements (bars, points, etc).
OnClick: Called if the event is of type 'mouseup' or 'click'. Called in the context of the chart and passed the event and an array of active elements.
Thank you.