apexcharts / Blazor-ApexCharts

A blazor wrapper for ApexCharts.js
https://apexcharts.github.io/Blazor-ApexCharts
MIT License
838 stars 92 forks source link

Not Able to use Chart Events #553

Open Sudheesh-TalentzQ opened 1 day ago

Sudheesh-TalentzQ commented 1 day ago

chart: { events: { mouseMove: undefined, mouseLeave: undefined, } } i need to use this option so i tried the below way

Chart = new Chart
                {
                    Toolbar = new Toolbar
                    {
                        Show = false
                    },
                    Events = new 
                    {
                        DataPointMouseEnter = @"function(event, chartContext, config) {
var chartElement = document.getElementById(config.globals.dom.baseEl.id);
if (chartElement) chartElement.classList.add('cursor-pointer');
}",
                        DataPointMouseLeave = @"function(event, chartContext, config) {
var chartElement = document.getElementById(config.globals.dom.baseEl.id);
if (chartElement) chartElement.classList.remove('cursor-pointer');
}"
                    }
                } 

in the apex chart option but im not able to get Events = new Events Anyone knows how to?

Sudheesh-TalentzQ commented 1 day ago

I want to make sure people know that its clickable so i need to change the mouse to a hand that's it

joadan commented 1 day ago

Hi, have you checked the sample, https://apexcharts.github.io/Blazor-ApexCharts/events/mouse-hover

Sudheesh-TalentzQ commented 1 day ago

Hi, have you checked the sample, https://apexcharts.github.io/Blazor-ApexCharts/events/mouse-hover

Yes, I'm using a funnel and i have given onclick but still no change in mouse hover ... In the sample you provide there is no code as well to make it show so i think this only work in Line chart but not in Funnel