Pre loader

Tag: SciChartSurface

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 vote
11k views

I cannot figure out how to setup SciChartSurface so that it would be initialized right away and IsSizeValidForDrawing returned true.

Now I have the special case for the first call to the view with SciChartSurface and I start working with it after receiving SizeChanged event. In this event handler and afterwards IsSizeValidForDrawing gets true and later on all my requests to the view are OK. It’s quite inconvenient.

When does SciChartSurface get resized? What makes it resize?
Which moment does IsSizeValidForDrawing get true?
What should I do to make the size valid after instantiating or receiving first bunch of data ?
How can I make it progmammatically?

This is my xaml:

        <s:SciChartSurface.RenderableSeries>
            <s:FastLineRenderableSeries XAxisId="XAxis1" YAxisId="YAxis1" AntiAliasing="False" />
            <s:FastLineRenderableSeries XAxisId="XAxis2" YAxisId="YAxis2" AntiAliasing="False"  />
            <s:FastLineRenderableSeries XAxisId="XAxis1" YAxisId="YAxis1" AntiAliasing="False" />
            <s:FastLineRenderableSeries XAxisId="XAxis2" YAxisId="YAxis2" AntiAliasing="False" />
            <s:FastLineRenderableSeries XAxisId="XAxis1" YAxisId="YAxis1" AntiAliasing="False"/>
            <s:FastLineRenderableSeries XAxisId="XAxis2" YAxisId="YAxis2" AntiAliasing="False"/>
        </s:SciChartSurface.RenderableSeries>

        <s:SciChartSurface.XAxes>
            <s:NumericAxis Id="XAxis1" />
            <s:NumericAxis Id="XAxis2" />
        </s:SciChartSurface.XAxes>

        <s:SciChartSurface.YAxes>
            <s:NumericAxis Id="YAxis1"  />
            <s:NumericAxis Id="YAxis2" />
        </s:SciChartSurface.YAxes>
    </s:SciChartSurface>

    <Grid Grid.Row="1" x:Name="myOverviews">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <s:SciChartOverview  Grid.Row="0" 
                    XAxisId="XAxis1"
                    ParentSurface="{Binding ElementName=mySurface}"
                    DataSeries="{Binding ElementName=mySurface, Path=RenderableSeries[4].DataSeries}"
                    SelectedRange="{Binding ElementName=mySurface, Path=XAxes[0].VisibleRange, Mode=TwoWay}"
                    Visibility ="Collapsed"
                    s:ThemeManager.Theme="BlackSteel">
        </s:SciChartOverview>

        <s:SciChartOverview Grid.Row="1" 
                    XAxisId="XAxis2"
                    ParentSurface="{Binding ElementName=mySurface}"
                    DataSeries="{Binding ElementName=mySurface, Path=RenderableSeries[4].DataSeries}"
                    SelectedRange="{Binding ElementName=mySurface, Path=XAxes[1].VisibleRange, Mode=TwoWay}"
                    Visibility ="Collapsed"
                    s:ThemeManager.Theme="BlackSteel">
        </s:SciChartOverview>
    </Grid>

All visibilities besides SciChartSurface are “Collapsed”

SciChart version 3.1.0.5077

Thank you

0 votes
0 answers
9k views

I use a similar multi-pane setup as your multi-pane stock chart demo and specify the ChartModifier within SciChartSurface.ChartModifier as follows:

<s:SciChartSurface.ChartModifier>
                        <s:ModifierGroup s:MouseEventGroup="SharedMouseGroup">
                            <s:RubberBandXyZoomModifier IsAnimated = "False" IsXAxisOnly = "True" ExecuteOn = "MouseRightButton"/>
                            <s:ZoomPanModifier XyDirection="XYDirection" ClipModeX = "ClipAtExtents" ExecuteOn ="MouseLeftButton" />
                            <s:MouseWheelZoomModifier XyDirection = "XYDirection"/>
                            <s:ZoomExtentsModifier IsAnimated = "False" ExecuteOn = "MouseDoubleClick" />
                            <s:CursorModifier SourceMode="AllSeries"  UseInterpolation="True" ShowAxisLabels="True"/>
                            <s:LegendModifier Name="GeneralLegend" ShowLegend="True" LegendPlacement ="Inside" GetLegendDataFor="AllSeries" Margin="10" LegendItemTemplate="{StaticResource LegendItemTemplate}"/>

                            <s:SeriesSelectionModifier ReceiveHandledEvents="True">
                                <s:SeriesSelectionModifier.SelectedSeriesStyle>
                                    <Style TargetType="s:BaseRenderableSeries">
                                        <Setter Property="StrokeThickness" Value="10"/>
                                    </Style>
                                </s:SeriesSelectionModifier.SelectedSeriesStyle>
                            </s:SeriesSelectionModifier>

                        </s:ModifierGroup>
                    </s:SciChartSurface.ChartModifier>

The problem I have is that the vertical chart modifier (a vertical line as part of the crosshair that vertically tracks the mouse cursor) is only visible within the respective pane where the mouse cursor is currently located at. When I move the mouse cursor onto another pane then the vertical line of the cross hair tracks in this different pane but only within this specific pane. I want the vertical line to be visible across all panes just like in your multi-pane stock chart demo. When I pan or zoom any of the panes then all panes are responding accordingly and in synchronized fashion, so I am sure the panes’ xaxis are all correctly linked to the primary xAxis.

What am I doing wrong?

Thanks

  • bbmat asked 9 years ago
  • last active 9 years ago
0 votes
0 answers
19k views

I want to implement a requirement to stack several different y-axes on top of a common x-axis that shows time and that all y-axes share. Like the examples “Vertically Stacked Axes”, “Multi-Pane Stock Charts” and “16-channel EEG”.
The one the is the most similar to what I need is the “Vertically stacked axes” but the lines overlap and are not truly separated (possibly implementation detail).
Now two of the examples use a SciChartGroup and several SciChartSurfaces and one uses one SciChartSurface and changes the Y-Axes.
It is a technical Chart and not used for Stocks. Like several temperature (or even mixing with a pressure) lines but in separate charts like “Vertically stacked Axes” and synced to the timeline axis.
But the y-Axes are configurable with different styles and some could be automatically adjusting the range and some not. They will not share the same visual and behavioral styles and must not overlap.

What would be the best way to go or recommended? SciChartGroup or one SciChartSurface. Would it be even possible to implement the behavior on one surface? Any alternatives?

Update
What makes me ask the question?
I had some code in xaml and could style and databind it but the more this gets configurable and unpredictable at design time I end up creating everything in code. I think especially when using multiple SciChartSurfaces. This deprives me of the possibilities of XAML I believe. I still want to have the possibility to style and bind it without coding tons of lines.

  • Uwe Hafner asked 9 years ago
  • last active 9 years ago
1 vote
14k views

I am considering applying server-side licensing for my javerScript application.

In the document below, there is a phrase “Our server-side licensing component is written in C++.”
(https://support.scichart.com/index.php?/Knowledgebase/Article/View/17256/42/)

However, there is only asp.net sample code on the provided github.
(https://github.com/ABTSoftware/SciChart.JS.Examples/tree/master/Sandbox/demo-dotnet-server-licensing)

I wonder if there is a sample code implemented in C++ for server-side licensing.

Can you provide c++ sample code?
Also, are there any examples to run on Ubuntu?

0 votes
15k views

Hello,

I wonder what the most efficient way is to completely reset (clean up) a SciChartGroup? I add all kinds of panes, add data series, add renderable series on different panes. Now, with a single call I like to reset the SciChartSurface to its original state (empty). I want to have all panes removed, as well as references the sciChartGroup may hold to panes, and references the panes hold to different renderable series and data series. I tried to clear ChartPaneViewModels, an observable collection that holds objects of type BaseChartPaneViewModel (which in turn implements IChildPane and ViewModelBase) but that did not have any effect. My SciChartGroup binds via ItemsSource to ChartPaneViewModels

What is your recommendation how to best reset the whole sciChartGroup?

Thanks,
Matt

  • bbmat asked 9 years ago
  • last active 9 years ago
0 votes
14k views

Hi,
I would like to paint SciChartSurface between definite X values with another color. Please see attached screenshot (grey area).
Is there easy and perfomance cost efficient way to do it? Now I just use TickProvider to draw 2 lines as borders of the area.

  • RTrade A asked 9 years ago
  • last active 9 years ago
0 votes
10k views

I constantly have OutOfMemoryException when I set IChartSeriesViewModel.DataSeries.FifoCapacity and there are 4 or more chart on a single SciChartSurface.
Exception’s code block is

viewModel.DataSeries.FifoCapacity = 1000000;

where viewModel is newly created instance of ChartSeriesViewModel class.
What it could be?

Exception stack trace is

A.  `1..ctor(Int32  )
Abt.Controls.SciChart.Model.DataSeries.XyDataSeries`2.ClearColumns()
Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.Clear()
Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.set_FifoCapacity(Nullable`1 value)

p.s. I have no opportunity to set x64 as target platform. My SciChart version is 3.1 but there is the same problem with 3.22.

1 vote
19k views

I need normal (not categorical) x-axes and hence need the SciChartSurface rather than SciStockChart but SciChartSurface does not seem to have the property “IsXAxisVisible” and a number rather vital properties. How can I create a multi pane chart group where I can use SciChartSurface and still retain the ability of, for example, a shared x-Axis?

Thanks

  • bbmat asked 9 years ago
  • last active 9 years ago
Showing 51 - 58 of 58 results