Blazor ChartEvents Double Click

I have a stacked bar chart (stacked colums).

I would like to intercept the double click event on the stacked item.

I found only "OnPointClick" for single click, and "OnPointDoubleClick" witch is deprecated.

How can I do to ?

Thanks


1 Reply

DG Durga Gopalakrishnan Syncfusion Team June 24, 2021 12:42 PM UTC

Hi David, 
  
Greetings from Syncfusion. 
  
As of now, we don’t have support for OnPointDoubleClick event. We request you to bind the double click for DIV element containing chart and OnPointClick to get the PointIndex, SeriesIndex of selected point. Please check with the below snippet and sample. 
  
Code Snippet : 
  
<div @ondblclick="OnDoubleClick"> 
<SfChart> 
        <ChartEvents OnPointClick="PointClick"></ChartEvents> 
</SfChart> 
</div> 
@code{ 
public void PointClick(PointEventArgs Args) 
    { 
        pointIndex = Args.PointIndex; 
        seriesIndex = Args.SeriesIndex; 
    } 
    public void OnDoubleClick(MouseEventArgs Args) 
    { 
        if(pointIndex != null && seriesIndex != null) 
        { 
            Console.WriteLine(pointIndex); 
            Console.WriteLine(seriesIndex); 
            pointIndex  = null; 
            seriesIndex = null; 
        } 
    } 
} 
  
  
If provided solution doesn’t meet your requirement, please revert us. 
  
Regards,  
Durga G 


Loader.
Up arrow icon