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

Can we assign two data sources to range navigator ?

I have a range navigator of Date Time type. 

I want to control/filter 2 charts by this range navigator. How can we do it ?

Can we assign 2 data sources to a range navigator ?

1 Reply

DD Dharanidharan Dharmasivam Syncfusion Team August 29, 2017 03:52 PM UTC

Hi Waqar, 

Thanks for contacting Syncfusion support. 

We have analyzed your query. We have prepared a sample based on your requirement. In this we have created two data source(data.Open & data.Close )and bind these data to range navigator as two series. In case of chart, we have rendered two charts in which we have bind each data source to separate chart. Find the code snippet to achieve this. 

JS: 

data = GetData(); 
 
function GetData() { 
      //Created two data source 
      data = { Open: series1, Close: series2 }; 
       return data; 
} 

$("#container").ejChart({ 
      //... 
          series: [{ 
                         dataSource: data.Open, 
                      }], 
}); 
 
$("#container2").ejChart({ 
        //... 
          series: [{ 
                              dataSource: data.Close, 
                          }], 
}); 
 
$("#scrollcontent").ejRangeNavigator({ 
      //... 
       series: [{ 
                      dataSource: data.Open,  
                  }, 
                  { 
                     dataSource: data.Close, 
                  }], 
        //Event to change the data in chart when range is selected in range navigator 
         rangeChanged: onchartloaded 
}); 
 
function onchartloaded(sender) { 
      //... 
 } 



 
If your query is misunderstood at our end, kinldy revert us with more information your query, so that we can provide you the solution sooner. 
 
Thanks, 
Dharani. 



Loader.
Up arrow icon