I want to know which event will be called when I click on the cross icon of the selected area in scatter plot chart.

I have used selection mode dragXY which Selects points by dragging with respect to both horizontal and vertical axes.
I want to perform some logic when user click on the cross button of the selected. I am not able to find which event will be called for that.please help me with that.

thanks,

Vaishali


5 Replies

GV Gopalakrishnan Veeraraghavan Syncfusion Team April 23, 2024 04:09 PM UTC

Hi Vaishali,


We have analyzed your query. When you click the cross icon of the selected area in the scatter plot, you can utilize the dragComplete event. This event is triggered when starting a drag selection, moving the selected area, and closing the selected area. Therefore, you can use this event when closing the selected area via the cross icon. We have attached a sample for your reference. Please check the following code snippet.

<ejs-chart

    #chart

    style="display:block; width: 92%"

    [chartArea]="chartArea"

    [primaryXAxis]="primaryXAxis"

    [legendSettings]="legendSettings"

    [primaryYAxis]="primaryYAxis"

    [title]="title"

    id="chartcontainer"

    selectionMode="DragXY"

    (dragComplete)="drag($event)" >


public drag(args: IDragCompleteEventArgs): void {

    const labelElement = document.getElementById('lbl') as HTMLElement;

    labelElement.innerText = 'DragCompleteEventTriggered';

  }


Sample: https://stackblitz.com/edit/angular-qunarv?file=src%2Fapp.component.html


API for dragComplete event:
https://ej2.syncfusion.com/angular/documentation/api/chart/#dragcomplete


Regards,

Gopalakrishnan



VJ Vaishali Jain replied to Gopalakrishnan Veeraraghavan April 24, 2024 10:07 AM UTC

hi  Gopalakrishnan Veeraraghavan,


Thanks for replying!

It's not working when you properly clicked on just the cross icon (click on it from the outside of the selected area, not from the inside), don't click on the selected area. When you pin pointedly click just on cross icon this function will not be triggered. Please check it again and help me with that.



Thanks,

Vaishali



NP Nishanthi Panner Selvam Syncfusion Team April 26, 2024 12:04 PM UTC

Hi Vaishali,


Upon analyzing your query, we regret to inform you that currently, there is no event to indicate a click on the cross icon of selected area.


Kindly revert us if you have any concerns.


Regards,

Nishanthi



VJ Vaishali Jain replied to Nishanthi Panner Selvam April 26, 2024 01:37 PM UTC

ok. I will see.


Thanks



SB Swetha Babu Syncfusion Team April 29, 2024 04:08 AM UTC

Vaishali,


Please get back to us if you need any other assistance.


Loader.
Up arrow icon