Pre loader

Have same VisibleRange in multiple charts

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums



We use ViewportManager to automatically calculate the visible range of Y-axis for all series in the chart.

   <s:SciChartSurface Margin="0, 5, 0, 0"  Grid.Column="2"
                           ViewportManager="{Binding ViewportManager}"
                           MinHeight="250" MinWidth="250"
                           RenderableSeries="{s:SeriesBinding SeriesVms}"
                           ChartTitle="{Binding ChartModel.Title}"
                           YAxes="{Binding YAxes}"
                           XAxes="{Binding XAxes}"
                           Style="{StaticResource YAxisStyle}"
                           Annotations="{s:AnnotationsBinding ChartModel.Annotations}">
      : (omitted for brevity)

This approach works fine for one chart.

We now have an additional requirement, which is to have the same VisibleRange for Y-axis over multiple charts. Basically, the VisibleRange should be set to be the [Min, Max] range over all the series in all charts.

Is there a way to achieve this with ViewportManager ?
Is there a way to make several charts related and assign it a common instance of ViewportManager?

BR, Gianni

  • You must to post comments

Yes there’s a really easy way to do this. You use WPF’s binding mechanism to bind the YAxis.VisibleRange of several YAxis to a common property in a ViewModel.

Do not share one ViewportManager instance between several charts – that isn’t supported.

In order to bind YAxis.VisibleRange when you are using AxesBinding, you can use the technique of applying styles to Viewmodel Generated types as mentioned in our documentation.

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.