We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

master slave principle for charts

hi, i use a golden layout with syncfusion charts in it and want to make a master slave principle.

so when you zoom in a chart on the "master", all other charts of type "slave" should zoom to the exact position and zoom factor like in the "master" but in their own chart.

for now i tryed it with the parameter zoomInfo and zoomPosition, but it doesnt work properly.

does someone know which parameter do i really need to get all zoom informations?


thanks anyway and sorry for my bad english :)

greetings

Proto


1 Reply

SB Swetha Babu Syncfusion Team December 2, 2022 08:42 AM UTC

Hi Proto,


Greetings from Syncfusion.


We can zoom the slave chart like the master by assigning the currentZoomFactor and currentZoomPosition from the zoomComplete event of the chart to the zoomFactor and zoomPosition of the slave chart. We have created an angular application to achieve your requirement. Please find the below stackblitz link for your reference.


Sample link: https://stackblitz.com/edit/angular-gucffx-2grbw9?file=app.component.html


Code Snippet:


<div class="control-section">

    <div align='center'>

        <ejs-chart (zoomComplete)="zoomChange($event)">

        </ejs-chart>

    </div>

    <div align='center'>

        <ejs-chart #chart>

        </ejs-chart>

    </div>

</div>

 

public zoomChange(args: IZoomCompleteEventArgs): void {

        this.chart.primaryXAxis.zoomFactor = args.currentZoomFactor;

        this.chart.primaryXAxis.zoomPosition = args.currentZoomPosition;

        this.chart.refresh();

    }


Screenshot:



Regards,

Swetha


Loader.
Live Chat Icon For mobile
Up arrow icon