SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
147 views

I am trying disable AutoRange=”Always” property for SciChartOverview. As for now I see only one way, change SciChartOverview template. But VS generate wrong template for SciChartOverview, chart line gone, after template replacement (I am using “Edit Template” -> “Edit Copy” feature from VS designer mouse context menu )

Here is template:

<s:SciChartOverview.Resources>
    <Style TargetType="{x:Type s:SciChartOverview}">
        <Setter Property="FontSize" Value="20"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Background" Value="{Binding (s:ThemeManager.Theme), Mode=OneWay, RelativeSource={RelativeSource Self}}"/>
        <Setter Property="Foreground" Value="{Binding (s:ThemeManager.Theme), Mode=OneWay, RelativeSource={RelativeSource Self}}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Fill" Value="{Binding (s:ThemeManager.Theme), Mode=OneWay, RelativeSource={RelativeSource Self}}"/>
        <Setter Property="Stroke" Value="{Binding (s:ThemeManager.Theme), Mode=OneWay, RelativeSource={RelativeSource Self}}"/>
        <Setter Property="SelectedRange" Value="{Binding Axis.VisibleRange, Mode=TwoWay, RelativeSource={RelativeSource Self}}"/>
        <Setter Property="RenderableSeriesStyle">
            <Setter.Value>
                <Style TargetType="{x:Type s:FastMountainRenderableSeries}">
                    <Setter Property="Fill" Value="{Binding Fill}"/>
                    <Setter Property="DataSeries" Value="{Binding DataSeries}"/>
                    <Setter Property="Stroke" Value="{Binding Stroke}"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="RenderableSeriesType" Value="{x:Type s:FastMountainRenderableSeries}"/>
        <Setter Property="ScrollbarStyle">
            <Setter.Value>
                <Style TargetType="{x:Type s:SciChartScrollbar}">
                    <Setter Property="Orientation" Value="Horizontal"/>
                    <Setter Property="GripsLength" Value="25"/>
                    <Setter Property="Background" Value="Transparent"/>
                    <Setter Property="ViewportStyle">
                        <Setter.Value>
                            <Style TargetType="{x:Type Control}">
                                <Setter Property="Opacity" Value="0"/>
                            </Style>
                        </Setter.Value>
                    </Setter>
                    <Setter Property="NonSelectedAreaStyle">
                        <Setter.Value>
                            <Style TargetType="{x:Type Path}">
                                <Setter Property="Fill" Value="{Binding (s:ThemeManager.Theme), Mode=OneWay, RelativeSource={RelativeSource Self}}"/>
                            </Style>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type s:SciChartOverview}">
                    <Grid x:Name="PART_Container">
                        <s:SciChartSurface x:Name="PART_BackgroundSurface" AnimateZoomExtentsCommand="" BorderThickness="0" Background="{TemplateBinding Background}" DebugWhyDoesntSciChartRender="False" Foreground="{TemplateBinding Foreground}" FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" Padding="{TemplateBinding Padding}" RenderPriority="Normal" UseLayoutRounding="True" ZoomExtentsCommand="">
                            <s:SciChartSurface.ViewportManager>
                                <s:DefaultViewportManager>
                                    <s:DefaultViewportManager.Services>
                                        <Utility:ServiceContainer/>
                                    </s:DefaultViewportManager.Services>
                                </s:DefaultViewportManager>
                            </s:SciChartSurface.ViewportManager>
                            <s:SciChartSurface.YAxis>
                                <s:NumericAxis AutoRange="Always" DrawMajorGridLines="False" DrawMajorBands="False" DrawMinorGridLines="False" IsPrimaryAxis="True" TextFormatting="###E+0" UseLayoutRounding="True" Visibility="Collapsed">
                                    <s:NumericAxis.Services>
                                        <Utility:ServiceContainer/>
                                    </s:NumericAxis.Services>
                                    <s:NumericAxis.TickProvider>
                                        <s:NumericTickProvider/>
                                    </s:NumericAxis.TickProvider>
                                    <s:NumericAxis.TickCoordinatesProvider>
                                        <s:DefaultTickCoordinatesProvider/>
                                    </s:NumericAxis.TickCoordinatesProvider>
                                </s:NumericAxis>
                            </s:SciChartSurface.YAxis>
                            <s:SciChartSurface.YAxes>
                                <s:NumericAxis AutoRange="Always" DrawMajorGridLines="False" DrawMajorBands="False" DrawMinorGridLines="False" IsPrimaryAxis="True" TextFormatting="###E+0" UseLayoutRounding="True" Visibility="Collapsed">
                                    <s:NumericAxis.Services>
                                        <Utility:ServiceContainer/>
                                    </s:NumericAxis.Services>
                                    <s:NumericAxis.TickProvider>
                                        <s:NumericTickProvider/>
                                    </s:NumericAxis.TickProvider>
                                    <s:NumericAxis.TickCoordinatesProvider>
                                        <s:DefaultTickCoordinatesProvider/>
                                    </s:NumericAxis.TickCoordinatesProvider>
                                </s:NumericAxis>
                            </s:SciChartSurface.YAxes>
                        </s:SciChartSurface>
                        <s:SciChartScrollbar x:Name="PART_Scrollbar" Axis="{TemplateBinding Axis}" Height="{Binding ActualHeight, ElementName=PART_BackgroundSurface}" Style="{TemplateBinding ScrollbarStyle}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</s:SciChartOverview.Resources>

The main task for me, set fixed VisibleRange for YAxis.

0 votes
2k views

We are trying to display a very large line data set and it seems SciChartOverview would be a good way of visualizing full range of data. Let’s say we have 10 lines of millions data points each to be displayed. The idea is to display down-sampled version of these 10 lines in SciChartOverview, and display full-sampled version in the parent surface with x range matched with scroll bar range in SciChartOverview. When user moves the scroll bar or changes its range in SciChartOverview, it will reload data into the parent surface.

Is there a way to achieve above? Thanks.

  • Caleb asked 2 years ago
  • last active 2 years ago
1 vote
7k views

I’m having two synced charts, one SciChartSurface and a SciChartOverview.

The SciChartSurface is bound via the SeriesSource to two ChartSeriesViewModels each consisting of a XyDataSeries<DateTime,double> and a FastLineRenderableSeries.
The important thing here is that the FastLineRenderableSeries has the IsDigitalLine property enable – to well – get a nice digital / stepped line instead of straight connections.

The SciChartOverview is bound to the SciChartSurface via the ParentSurface property. All works fine, except that the data series on the SciChartOverview is drawn with straight connecting lines instead of the digital / stepped line. Unfortunately I found no way to explicitly specify an IRenderableSeries or to reuse the ChartSeriesViewModel on the SciChartOverview.

I also tried to use the DataSeries property directly, but of course, this just defines the IDataSeries and not the IRenderableSeries on which I could set the IsDigitalLine property.

Is there any way to get the SciChartOverview to draw a digital line or at least just use the ChartSeriesViewModel bound to the associated ParentSurface?

Thanks!

  • Manuel R. asked 5 years ago
  • last active 5 years ago
2 votes
7k views

Hi Guys

I am using an ItemsControl to display a collection of SciStockCharts. I want to be able to use a single SciChartOverview (not part of the Item Template) to set the visible range on all of the charts displayed in the ItemsControl. Is this possible and if so how would I go about achieving it.

Thanks in advance
Regards
Ian Carson

  • Ian Carson asked 6 years ago
  • last active 5 years ago
Showing 4 results
This template supports the sidebar's widgets. Add one or use Full Width layout.
SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+