TradingPal / react-native-highcharts

📈 Add Highcharts charts to react-native app for IOS and Android
https://github.com/TradingPal/react-native-highcharts
256 stars 158 forks source link

Unable to sync zooming of multiple charts.Is there any choice to sync zoom of charts in React native. #132

Open sumaammu1808 opened 1 year ago

sumaammu1808 commented 1 year ago

syncExtremes=(e)=> { var self = this; var thisChart = self.chart; var thisChart = this.chart; if (e.trigger !== 'syncExtremes') { // Prevent feedback loop Highcharts.each(Highcharts.charts, function (chart) { if (chart!=thisChart) { if (chart.xAxis[0].setExtremes) { // It is null while updating chart.xAxis[0].setExtremes(e.min, e.max, undefined, false, { trigger: 'syncExtremes' }); } } }); } }

in chart cofiguration i have kept like this,but syncExtremes is not at all called here.Please guide me am i missing anything.

xAxis: { type: 'datetime', events: { setExtremes: syncExtremes, }