SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Hello,
is it possible to display the series name of the series used for the overview chart? In this special case, i have a chart containing many series and it should be configurable which one is selected for the overview chart. The problem is, on the overview chart it is not easily visible which series is displayed, especially if zoomed in.
My last-resort solution would be to place the name of the series over the overview chart manually, but maybe you know a more elegant solution
Thanks,
Robin
Hello Robin,
It’s not something we support natively, but you may be able to achieve this by re-templating the overview control. For the sake of other posters, here is the control template of the SciChartOverview control. You can adjust this to suit your needs:
<!-- SciChartOverviewControl --> <Style TargetType="SciChart:SciChartOverview"> <Setter Property="NonSelectedRangeColor" Value="{StaticResource OverviewFillColor}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="SciChart:SciChartOverview"> <Grid Name="PART_Container"> <SciChart:SciChartSurface x:Name="PART_OverviewControl" Padding="0"> <SciChart:SciChartSurface.GridLinesPanelStyle> <Style BasedOn="{StaticResource DefaultGridLinesPanelStyle}" TargetType="SciChart:GridLinesPanel"> <Setter Property="BorderThickness" Value="0" /> </Style> </SciChart:SciChartSurface.GridLinesPanelStyle> <SciChart:SciChartSurface.RenderableSeries> <SciChart:FastMountainRenderableSeries /> </SciChart:SciChartSurface.RenderableSeries> <SciChart:SciChartSurface.YAxis> <SciChart:NumericAxis AutoRange="True" DrawMajorGridLines="False" DrawMinorGridLines="False" TextFormatting="###E+0" Visibility="Collapsed"> <SciChart:NumericAxis.GrowBy> <SciChart:DoubleRange Max="0.1" Min="0.0" /> </SciChart:NumericAxis.GrowBy> </SciChart:NumericAxis> </SciChart:SciChartSurface.YAxis> </SciChart:SciChartSurface> <StackPanel Name="PART_RangeSliderContainer" Orientation="Horizontal"> <Rectangle Name="PART_LeftEdge" /> <Thumb Name="PART_LeftThumb" Cursor="SizeWE" /> <Thumb Name="PART_MiddleThumb" Cursor="Hand" Opacity="0" /> <Thumb Name="PART_RightThumb" Cursor="SizeWE" /> <Rectangle Name="PART_RightEdge" /> </StackPanel> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- GridLinesPanel --> <Style x:Key="DefaultGridLinesPanelStyle" TargetType="SciChart:GridLinesPanel"> <Setter Property="BorderBrush" Value="{StaticResource GridBorderBrush}" /> <Setter Property="Background" Value="{StaticResource GridBackgroundBrush}" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="SciChart:GridLinesPanel"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Border> <Grid> <Canvas Name="PART_HorizontalGridLinesPanel" /> <Canvas Name="PART_VerticalGridLinesPanel" /> </Grid> </Border> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
Remember the SciChartOverview binds to a ParentSurface DataSeriesSet and uses DataSeriesIndex to define which series to render. Also the FastMountainRenderableSeries has a DataSeries property which is set internally with the correct dataseries. DataSeries itself has SeriesName.
Sorry its not a complete solution, but hope it points you in the right direction,
Andrew
Update Nov 2014
New to v3.2, we have new articles on styling the SciChartOverview, using our new ScrollBars API,
Please see Scrolling a Chart with the Overview which includes SciChartOverview control templates for v3.2, as well as v3.1 or below.
Also see Creating a Custom Overview with many series (a frequently asked question), and our new articles on the SciChartScrollBar API.
Please login first to submit.