Pre loader

How to bind Annotations of MainChartSurface to OverviewSurface

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

1
0

hello.
I added an OverView and scrollbar below the main chart, referring to the CustomOverviewView example.
Graph and scroll functions work without problems.
I want to show the main chart annotations in the OverView.
How can I solve my problem?
have a good day!

Version
6.5.1.26063
  • You must to post comments
0
0

Hi there,

You can place anything in the SciChartOverview if you use this technique from the documentation.

How to: Create a Custom SciChartOverview with any Background

The SciChartOverview only supports a single series behind it, and does
not allow a custom background. You can however use the
SciChartScrollbar API to create a custom overview.

<Grid Background="{Binding ElementName=MainChartSurface, Path=Background}">
         <Grid.RowDefinitions>
               <RowDefinition Height="*" />
               <RowDefinition Height="100" />
         </Grid.RowDefinitions>
  
         
         <s:SciChartSurface x:Name="MainChartSurface">
            
         </s:SciChartSurface>
  
         
         <Grid Grid.Row="1" >
  
               
  
               
               <s:SciChartScrollbar Grid.Column="0"
                   Axis="{Binding ElementName=MainChartSurface, Path=XAxis}" />
         </Grid>
  </Grid>
  

Using this technique you can place anything behind a SciChartScrollbar to create an overview with custom series. You can place annotations on the series as well.

Just be advised that you cannot have the same Annotation instance on two SciChartSurfaces. This is because Annotations are UIElements and cannot have two parents.

If you want the same annotations on two charts they will need to be duplicated. This can be done with either SciChart’s MVVM Annotations API or with XAML or Code-behind annotations.

Best regards
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.