Pre loader

Tag: Performance

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
17k 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-dev.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?

2 votes
15k views

I have a situation where I need to have a lot of independent realtime charts rendered on the screen at the same time. I have put a scichart into a user control and that user control into a list so I can reuse my configuration.

Unfortunately, the behavior I am seeing is that when I have more than 5 charts, the charts stutter really badly. I’m using the SciChartPerformanceOverlay to determine what the FPS is of each of the charts.

I can see that in my 5 chart situation, if my mouse cursor is NOT over the window or NOT moving on the window, each chart has an FPS of ~18 for SciChartSurface and an FPS of >500 for Composition Target. When I start to move the mouse around on top of the window, the SciChartSurface FPS value drops to < 5 and the Composition Target drops to ~300.

I’ve got no mouse events hooked up, I’ve set TryApplyDirectXRenderer to true and it seems to accept it. I’ve double-checked the following values:

Direct3D10CompatibilityHelper.HasDirectX10CapableGpu: True
Direct3D10CompatibilityHelper.HasDirectX10RuntimeInstalled: True
Direct3D10CompatibilityHelper.IsSupportedOperatingSystem: True
Direct3D10CompatibilityHelper.SupportsDirectX10: True

I’m suspending the chart before adding points. Each chart only has 1000 points inside a XyDataSeries<int, double> that is databound to a FastLineRenderableSeries. I’m even using Update instead of Append to try to reuse the same memory, in case that makes a difference.

I’ve played with the MaxFrameRate and nothing seems to help.

My dev machine is a bit old and the graphics card is Intel-based, but I never imagined the performance would get so bad so quickly. I’m hoping there’s something I’m missing here as I’ve read such good things about SciChart.

Please let me know if there’s any advice.

Thanks

1 vote
15k views

I have an application that is using 20 fastrederableseries for the purpose of high-speed stripcharting. With only one series visible, the chart fails to render at 20ms intervals. It is very sporadic between 20-150 ms. I have searched the forums and completed the following to improve performance:

resamplingmode = mid
antialiasing = false
renderpriority = low
strokethickness = 1 (although this is too small)

None of these changes resolve the stutter or speed limitations. If I move to a different screen where the chart is not located, speed is no longer an issue. I believe the rendering is slowing things down. How can I imporve this?

Chart XAML:

<s:SciChartSurface x:Name="sciStripChart" Padding="400,45,10,5" s:ThemeManager.Theme="ExpressionDark" Margin="0,0,0,0" RenderPriority="Normal">
      <s:SciChartSurface.RenderSurface>
                 <!-- High Quality subpixel rendering -->
                 <s:HighQualityRenderSurface/>
                  </s:SciChartSurface.RenderSurface> 
                  <s:SciChartSurface.XAxis>
                  <s:NumericAxis x:Name="xAxis" AxisTitle="Time (seconds)" AutoRange="Never" DrawMinorGridLines="False" IsStaticAxis="True" TextFormatting="0.#">
                  </s:NumericAxis>
                  </s:SciChartSurface.XAxis>
                  <s:SciChartSurface.YAxis>
                  <s:NumericAxis x:Name="yAxis"  AxisTitle="Awesomeness (A)" AutoRange="Never" DrawMinorGridLines="False" />
                         </s:SciChartSurface.YAxis>
                        <s:SciChartSurface.ChartModifier>
                                   <s:ModifierGroup>

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

20 data series created in code using this:

// Create a DataSeries and append some data
var dataSeries = new XyDataSeries<double, double>();
 // Create a RenderableSeries and ensure DataSeries is set
 var renderSeries = new FastLineRenderableSeries
{
         StrokeThickness = 1,
         AntiAliasing = false,
         ResamplingMode = Abt.Controls.SciChart.Numerics.ResamplingMode.Mid,

          SeriesColor = fdctCollection[fdctCollection.Count - 1].color,
          DataSeries = dataSeries,
};

    renderSeries.DataSeries.SeriesName = "Tag " + (z+1);
     // Add the new RenderableSeries
    sciStripChart.RenderableSeries.Add(renderSeries);
    sciStripChart.RenderableSeries[fdctCollection.Count - 1].IsVisible = fdctCollection[fdctCollection.Count - 1].PenEnable;

Attempting to append data and adjust the x-axis every 20 ms:

sciStripChart.RenderableSeries[CurrentPointCount].DataSeries.XValues.Add(CurrentTimeCounter);
sciStripChart.RenderableSeries[CurrentPointCount]DataSeries.YValues.Add(NewYaxisData);

 sciStripChart.RenderableSeries[0].XAxis.AnimatedVisibleRange = (new DoubleRange(CurrentTimeCounter- 100, ((CurrentTimeCounter-0.4))));
1 vote
14k views

Hello,
I’m using your package for price charting. And I need to put on one bar (or candlestick) several markers (for example several dots with different colours and sizes). Also sometimes I need to change size on some of these markers. Now I am doing this by putting CustomAnnotations. Is there a way to plot the same with for example XyScatterRenderableSeries to increase drawing speed?

Best regards,
Roman.

  • Roman asked 9 years ago
  • last active 9 years ago
1 vote
13k views

I am adding charts with 10 million points.

With 40 million points the chart throws an OutOfMemoryException

In SciChart is there a limit on the number of points ? Or should I configure something?

  • I added 3 XyDataSeries<double, double> each with 10 million points. I get 7-8 FPS at the start, and 111-130 FPS when I zoom in.
  • I added 3 XyDataSeries<DateTime,Double> each with 10 million points: I get 2-3 FPS at the start, but when you zoom in the chart freezes.

Why such a difference if X data type is DateTime?

  • Nicholas asked 10 years ago
  • last active 10 years ago
0 votes
13k views

I’ve got a few questions about plotting Lat/Long coordinates in real time.

Situation
I’ve got two data series – (Timestamp, Latitude) & (Timestamp, Longitude) being updated 10 times/second. My goal is to graph car position in real time with a ScatterRenderableSeries and color each point according to other channels of data (temp, brake pressure, yaw rate, etc..).

How to best associate metadata?
In order to color the plotted points I need to be able to associate them with their respective timestamps. Do you have any advice on how best to do so? It seems the most obvious solution is using the PointMetaData API, but I’m curious if there would be a more efficient solution (like say somehow using an Xyz/Xyy DataSeries).

Dealing with the unsorted nature of the data?
I’m aware that SciChart performs much better when only inserting sorted data into a XyDataSeries. Seeing as I only receive GPS data 10 times/sec, I’m wondering if you think the lost performance will still pose a problem?

I’d appreciate any advice you could give!

2 votes
13k views

Hello,

This is my data structure which needs to be plotted using XyScatterRenderableSeries:

public class Measurement
    {
        public Color Color { get; set; }
        public double X { get; set; }
        public double Y { get; set; }
    }

I need to plot a list of measurements. It can be done in one series but each point color needs to be read from measurement data. To achieve that I’ve used a custom PaletteProvider and the result is satisfactory:

single series

It looks good but there is a huge problem with a performance. If I try to pan, zoom etc. the application horribly slows down.
Also I’ve tried to group measurements by Color and then plot a couple of series with specified color but the result is the same.

I am attaching a simple application which shows the problem.
Hope anyone can help me.

Best regards,
Darek

0 votes
13k views

I have an unfinished project using the trial version on Visblox. I did not buy the licence since the performance was not good enough. Now Visiblox stopped support and so I am migrating to SciCharts. I have some questions though hope you can help.

  1. The chart is DateTime,Double type, and there are multiply datapoints on some dates. When editing I need to delete particular points but the Remove method seems to remove all Y values for specific X value. So is it possible to remove a particular X,Y datapoint only from the chart?

  2. I need to give each datapoint a name and I was using TextAnnotations on Visiblox (which had a datapoint property). However on SCIcharts the TextAnnotations does not have Datapoint property. How can I do this please?

  3. I have 2 charts showing audio waveforms. One showing the full time and one showing a zoomed section. When I hit Play I need the zoomed chart to follow the music waveform. With Visiblox I was using a dispatcher timer and on every tick(20ms) I update the Xaxis range, however the performance was not very good.
    What best method to use for SCI charts please?

1 vote
11k views

Comparing Performance for a Fifo Chart yields unexplained outcome. Fastest Renderer: high quality renderer. Slowest: direct3d.
My problem is not that they don’t reach the tested performance but that the high quality renderer looks fastest. I would expect direct3d to be the fastest.

Can anyone explain this or possibly find an error in my code or reasoning?

I attach sample code.
First picture is in debug build and the second in release build. In release the software renderers are not so far apart any more but still noticeable.

Explanation of test:

I used the FifoSample from the samples suite and changed it for performance tests.

There are 2 projects. One is the control in WpfControl using SciChart the other one is hosting the control in WpfControlHost. (This setup is only this complicated for testing because it will by my setup later.)

I got the following outcome. Essentially high quality renderer is fastest. Taking less time. Frequency is the highest. Then comes the high performance renderer and finally the direct3d renderer.

What is the test supposed to do (if I didn’t make a mistake!):

The goal is to reach 110.000 Hz sample rate (worker_DoWork.hertz * this._multiplier). Putting in 10 values at once for each series on an iteration round. Iterations try to reach 11.000/sec.

In source code: (method: worker_DoWork)hertz = 11.000 and this._multiplier = 10

Measurements are done by Microsoft StopWatch Class where 1second is documented as = StopWatch.Ticks/StopWatch.Frequency (of Processor).

To switch the renderers I uncomment the sections in UserControl1.xaml and run a test in debug or release build without Visual Studio attached.

  • Uwe Hafner asked 9 years ago
  • last active 9 years ago
0 votes
10k views

Hello I am curenntly using three REAL Time Charts (FiFo) in my WPF application and I am running into performance issues, which result in UI stuttering. I tried to optimize my performance using your very informative article on performance (Rendering,Stroke,Buffer etc.), but it did not help much, so I wondered if you might be able to help me.

I currently use three graphs and each of them has two different sets of data applied. The size of my FiFo graphs is 100 samples, with a dt= 0.01 (100Hz). I assume the OnNewData event is triggered at that rate as well?

My current code looks like this:

private void OnNewData(object sender, EventArgs e)
    {

        if (TaskManager.tempObject. != null)
        {
            lock (TaskManager.tempObject)
            {
                y0 = Math.Abs(TaskManager.tempObject.LaserPosRel - TaskManager.tempObject.AxisPos);
                y1 = TaskManager.tempObject.AxisPos;
                y2 = TaskManager.tempObject.AxisSpeed;
                y3 = TaskManager.tempObject.AxisAcc;
                y4 = y1;
                y5 = TaskManager.tempObject.LaserPosRel;

            }
        }


        using (sciChartSurface1.SuspendUpdates())
        {
            _series0.Append(t, y0);


        }

        using (sciChartSurface2.SuspendUpdates())
        {

            _series1.Append(t, y1);
            _series2.Append(t, y2);
            _series3.Append(t, y3);


        }

        using (sciChartSurface3.SuspendUpdates())
        {

            _series4.Append(t, y4);
            _series5.Append(t, y5);

        }

        // Increment current time
        t += dt;
    }

I wondered if you have any proposals how to enhance my code, regarding performance?
Would it make a difference if I would Append the series in a new thread? I was not sure of this, since it is stated
in the FAQ that SciChart already uses it’s own threads for rendering.

Any help is appreciated, thanks in advance!

best regards

nils

  • nesphit asked 8 years ago
  • last active 8 years ago
0 votes
10k views

I getting a weird behavior on my xAxis and yAxis with a real time SciChart.

The labels on axes and the chart itself start shaking like it is trying to update positions but it never gets steady.

I have a background routine adding data to the data series every second and every chart have two series with 2 YAxis, there are only two charts visible in the window at a given time.

Also I have noticed that after a few minutes of doing this the window itself get sluggish and not responsive anymore, I switch to another tab which doesn’t have a chart it start responding again.

Have anyone seeing something like this?

I have tried the Performance Tips and Tricks but nothing changes this behavior.

I’m using a Surface 3 pro with SciChart version 3.3.0.5909

Here is my XAML and the dispatcher timer adding data to the dataseries.

<UserControl 
x:Class="PulseControl.CustomControls.RealTimeEnergy" 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:m="clr-namespace:PulseControl.Models"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
xmlns:ee="http://schemas.microsoft.com/expression/2010/effects" 
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
xmlns:Custom="http://metro.mahapps.com/winfx/xaml/shared" 
xmlns:PulseControl="clr-namespace:PulseControl" 
xmlns:converters="clr-namespace:PulseControl.Converters" 
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:s="http://schemas.abtsoftware.co.uk/scichart" 
xmlns:cc="clr-namespace:PulseControl.CustomControls"
Width="Auto"
Background="{StaticResource WindowBackgroundBrush}" 
mc:Ignorable="d" d:DesignHeight="140" d:DesignWidth="600" d:DataContext="{d:DesignInstance {x:Type m:MainWindowsModel}}"
>
<UserControl.Resources>
    <ResourceDictionary>
        <converters:IntToKiloConverter x:Key="Int2Kilo" />
    </ResourceDictionary>
</UserControl.Resources>

<DockPanel 
    Background="{StaticResource WindowBackgroundBrush}" >

    <Grid 
        DockPanel.Dock="Top"
        Height="140">
        <Grid.RowDefinitions>
            <RowDefinition Height="100"></RowDefinition>
            <RowDefinition Height="40"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="170"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="170"></ColumnDefinition>
        </Grid.ColumnDefinitions>


        <Border 
            Grid.Column="0"
            Grid.Row="0"
            CornerRadius="50"
            Width="170"
            Margin="0"
            Padding="0"
            Background="{StaticResource ColorLeftChartBrush}"
            BorderThickness="1">
            <TextBlock 
                Style="{StaticResource FieldTextBoxStyle}"
                Foreground="{StaticResource BlackBrush}"
                HorizontalAlignment="Center"
                Padding="0"
                Margin="0"
                FontSize="60"
                VerticalAlignment="Center"
                Text="{Binding Laser.OpData.AvgKiloVoltagePerSecond, Mode=OneWay, StringFormat={}{0:N1}}">
            </TextBlock>
        </Border>

        <Label
            Grid.Column="0"
            Grid.Row="1"
            Style="{StaticResource FieldLabelStyle}"
            FontSize="20"
            HorizontalAlignment="Center"
            VerticalAlignment="Top">
            Voltage (kV)
        </Label>


        <s:SciChartSurface 
            Name="sciChart" 
            Grid.Column="1"
            Grid.RowSpan="2"
            Height="140"
            Background="{StaticResource WindowBackgroundBrush}"
            s:SciChartGroup.VerticalChartGroup="OPERATION"
            Width="Auto"
            Margin="0"
            Padding="8 8 8 10"
            RenderPriority="Low"
            MaxFrameRate="30">

            <s:SciChartSurface.RenderableSeries>

                <s:FastMountainRenderableSeries 
                    x:Name="serieVoltage" 
                    SeriesColor="{StaticResource ColorLeftChart}" 
                    StrokeThickness="2"
                    YAxisId="LAXIS"
                    DataSeries="{Binding ChartData.ChartDataVoltage}">
                    <s:FastMountainRenderableSeries.AreaBrush>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Color="#A860a917" Offset="0"/>
                            <GradientStop Color="#3360a917" Offset="1"/>
                        </LinearGradientBrush>
                    </s:FastMountainRenderableSeries.AreaBrush>
                </s:FastMountainRenderableSeries>

                <s:FastMountainRenderableSeries 
                    x:Name="serieEnergy" 
                    SeriesColor="{StaticResource ColorRightChart}" 
                    StrokeThickness="2"
                    YAxisId="RAXIS"
                    DataSeries="{Binding ChartData.ChartDataEnergy}">
                    <s:FastMountainRenderableSeries.AreaBrush>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Color="#A83376E5" Offset="0"/>
                            <GradientStop Color="#333376E5" Offset="1"/>
                        </LinearGradientBrush>
                    </s:FastMountainRenderableSeries.AreaBrush>
                </s:FastMountainRenderableSeries>

            </s:SciChartSurface.RenderableSeries>

            <s:SciChartSurface.XAxis >
                <s:DateTimeAxis Name="xAxis" AutoRange="Always"  IsStaticAxis="True" TextFormatting="dd HH:mm" SubDayTextFormatting="HH:mm:ss" CursorTextFormatting = "mm:ss" Foreground="White"  />
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxes>
                <s:NumericAxis 
                    AutoRange="Always" 
                    GrowBy="0,0.5"
                    IsPrimaryAxis="True"
                    AxisAlignment="Right"
                    Id="RAXIS"
                    Style="{StaticResource NoMinorLines}">
                </s:NumericAxis>
                <s:NumericAxis 
                    AutoRange="Always" 
                    GrowBy="0,0.25"
                    IsPrimaryAxis="False"
                    Id="LAXIS"
                    AxisAlignment="Left"
                    Style="{StaticResource NoMinorLines}">
                </s:NumericAxis>
            </s:SciChartSurface.YAxes>

            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:RubberBandXyZoomModifier IsEnabled="{Binding ChartData.ZoomEnabled, Mode=TwoWay}" IsXAxisOnly="True"></s:RubberBandXyZoomModifier>
                    <s:ZoomPanModifier IsEnabled="{Binding ChartData.PanEnabled, Mode=TwoWay}"></s:ZoomPanModifier>
                    <s:MouseWheelZoomModifier IsEnabled="{Binding ChartData.MouseWheelEnabled, Mode=TwoWay}"></s:MouseWheelZoomModifier>
                    <s:RolloverModifier IsEnabled="{Binding ChartData.RolloverEnabled, Mode=TwoWay}"></s:RolloverModifier>
                    <s:CursorModifier IsEnabled="{Binding ChartData.CursorEnabled, Mode=TwoWay}"></s:CursorModifier>
                    <s:YAxisDragModifier></s:YAxisDragModifier>
                    <s:XAxisDragModifier></s:XAxisDragModifier>
                    <s:ZoomExtentsModifier></s:ZoomExtentsModifier>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>

        </s:SciChartSurface>

        <Border 
            Grid.Column="2"
            Grid.Row="0"
            CornerRadius="50"
            Width="170"
            Margin="0"
            Padding="0"
            Background="{StaticResource ColorRightChartBrush}"
            BorderThickness="1">
            <TextBlock 
                Style="{StaticResource FieldTextBoxStyle}"
                Foreground="{StaticResource BlackBrush}"
                HorizontalAlignment="Center"
                Padding="0"
                Margin="0"
                FontSize="60"
                VerticalAlignment="Center"
                Text="{Binding Laser.OpData.AvgEnergyPerSecond, Mode=OneWay, StringFormat={}{0:N1}}">
            </TextBlock>
        </Border>

        <Label
            Grid.Column="2"
            Grid.Row="1"
            Style="{StaticResource FieldLabelStyle}"
            FontSize="20"
            HorizontalAlignment="Center"
            VerticalAlignment="Top">
            Energy (mJ)
        </Label>

    </Grid>

</DockPanel>

Model

void _timer_Tick(object sender, EventArgs e)
    {
        DateTime now = DateTime.Now;

            // Things to do when running
        SafeAddPoint(_chartDataEnergy, now, Laser.OpData.AvgEnergyPerSecond);
        SafeAddPoint(_chartDataEfficiency, now, Laser.OpData.ChamberEfficiency * 100.0);
        SafeAddPoint(_chartDataVoltage, now, Laser.OpData.AvgKiloVoltagePerSecond);
        SafeAddPoint(_chartDataPressure, now, Laser.OpData.Pressure);
        SafeAddPoint(_chartDataSigmaEnergy, now, Laser.OpData.SampleSigma);
        SafeAddPoint(_chartDataSigmaPercentage, now, Laser.OpData.SampleSigmaPercentage);
        SafeAddPoint(_chartDataTemperature, now, Laser.OpData.Temperature);
    }

    private void SafeAddPoint(IDataSeries serie, DateTime dt, double val)
    {
        if (serie.ParentSurface != null)
            using (serie.ParentSurface.SuspendUpdates())
                ((XyDataSeries<DateTime, double>)serie).Append(dt, val);
        else
            ((XyDataSeries<DateTime, double>)serie).Append(dt, val);
    }
0 votes
10k views

Hi,

I wonder if there is a way of modifying the Z-Index/render priority of individual points in a XyScatterRenderableSeries based on a value in the metadata.

I have a chart with tons of datapoints (anything between 100k -2M points) and they are plotted very close to each other in X/Y. I’m also using a custom pointmaker to color and resize the points based on a value in the metadata.

Even when using ResamplingMode.None, some points are automatically “optimized” away (not rendered). I’d like a way of setting a render priority based on a value in the metadata so the points with higher values are rendered on top of the ones of lower values. Or the ones with lower values are “optimized away” first. Can this be done?

0 votes
10k views

Hi, we got performance problems with 3D chart on UniformGridDataSeries3D when size of mesh is bigger than 400×400.
The rendering is fine, but it have weird behavior when controlling from mouse: rendering is lags behind mouse movement and it’s hard to rotate the surface accurate.

To reproduce it you can use SciChart_SurfaceMesh3DNonUniformData scichart example and set the surface size to 500×500 for example.

Perfectly we are planning to use 1500×1500 mesh but currently we had to downsample it to 250×250.

Is there is some workaround for this?
Thanks

0 votes
9k views

I am working on an MVVM application that has a dozen or so view models, each having multiple XY data series that are being displayed in a chart. Now I need to add annotations to the charts for some of the view models. I have some code up and running but am running into a few issues and I wanted to see if you have any suggestions for a way forward.

The first issue relates to performance. Each data series (~100K data points) can have several thousand annotations associated with it. In the app, the view models are all created in memory and the user can change between them by selecting one in a list box (see attached image). Once the number of annotations starts to get into the thousands, I start to notice a delay when switching between data models where one of them contains annotations. If I click a different item in the list box, it takes a few seconds before the selection actually changes and the chart is updated. The delay seems to be more pronounced when switching FROM a view model that has annotations TO one that does not contain them. The delay increases with the number of annotations. I’m not sure if there is anything that can be done about this but thought I would check.

The second issue relates to how the view models are created. Because I am loading data for ALL of the view models into memory, I am trying to create them asynchronously in a background thread as much as possible so the UI remains responsive. That was fine when I was just dealing with the XY data, but it is causing problems for the annotations. If I try to create the CustomAnnotation objects in a background thread I get an error “The calling thread must be STA, because many UI components require this.” Do you have any suggestions for how to create lots of annotations while keeping the UI responsive?

Thanks,
Scott

  • sdamge asked 8 years ago
  • last active 8 years ago
0 votes
9k views

Performance degrades at a much higher rate when adding FastBandSeries (with multiple axes) when compared to FastLineSeries (with one Y-Axis)

I have this demo project that shows the rendering stuttering that occurs when panning the FastBand Chart. To ensure that this is not some performance hit of purely having multiple Y-Axes, you can simply add one series and the behavior persists. (As well as I know there are examples with multiple Y-Axes with line series that are blazing fast).

I would really like to get to the bottom of this as the one chart type is dragging down the performance of our product overall.

Below the demo project is attached.

It has been 3 weeks since I’ve posted with no input or feedback — quite unacceptable.

1 vote
9k views

I’ve created a view with approximately 50 series, each containing ~200 datapoints.

I have noticed that rendering this with the legend showing, has a significant performance impact. I would expect the legend to have a cost, but I’m seing a big change in render time (the chart refreshes when the user checks a checkbox, so the performance has to be good).

I’ve added the legend using the following standard (I believe) xaml:

s:LegendModifier x:Name=”legendModifier”
IsEnabled=”True”
ShowLegend=”True”
Orientation=”Vertical”
Margin=”5″
LegendPlacement=”Inside”
GetLegendDataFor=”AllVisibleSeries”
ShowVisibilityCheckboxes=”False”
ShowSeriesMarkers=”True”
ScrollViewer.VerticalScrollBarVisibility=”Auto”/

When I set IsEnabled=”False” the performance improves significantly.

Does anybody have any hints to how performance can be improved?

Best regards

1 vote
8k views

I have just finished my first pass evaluation of the SciChart performance. When drawing a lesser number of points (<100000), SciChart outperforms two other packages I have evaluated. However, when drawing more points (200,000 – 2,000,000), SciChart does not meet the performance of the other packages.

The evaluation involved selecting a different number of lines and number of points per line. The transition to worse performance occurred in the following setups:

Line Count Points/Line Loop Count Total Time (ms)
2 100,000 25 1890
5 100,000 25 4670
2 1,000,000 10 7400
2 10,000,000 10 74000

These setups average out to about 0.37 usec per point. This is where the other packages outperformed SciChart, as their per point times kept improving.

I have tried to follow all of the performance tips I found on your website. I have included the code used to evaluate SciChart and would appreciate any help in improving the results.

Thanks,
Dave

  • Dave Leach asked 8 years ago
  • last active 8 years ago
1 vote
8k views

I’m trying to merge xvalues of two data series (both must have equals xvalues).
First, i get a keys – collection of different keys, and want to insert this keys into second data series.

        using (ds.SuspendUpdates())
        {
                int keyIndex = 0;
                int dsIndex = ds.FindIndex(keys[0], SearchMode.RoundUp);

                while (dsIndex < ds.XValues.Count)
                {
                    if (keyIndex >= keys.Count) break;

                    if (ds.XValues[dsIndex] > keys[keyIndex])
                    {
                        ds.Insert(dsIndex, keys[keyIndex], Double.NaN);
                        keyIndex++;
                    }

                    dsIndex++;
                }
       }

But if ds.XValues.Count = 1200000 and keys’s count = 200000, that this method work to much time.
Complexity of this method is O(n), so i want to know what is performance (complexity) of data series insert method?

0 votes
7k views

Hi! I’m trying to add realtime mountain chart into WinForms project via ElementHost.
It works fine, but when I increase the chart form size and move mouse over it, it starts to block another timers events I use to update controls. It happens no matter how much datapoints I have and no matter witch render I use (HighSpeed or D3D).
Both DispatcherTimer and Forms.Timer are affected.

I’ve uploaded simple project to demonstrate this behevior:
https://drive.google.com/open?id=0B6kEDZ8g68YzcXdyRHVhSGctN0U

It simply switches between two datasets by the timer in WPF Control, and another timer updates the winforms label.
When I start to move mouse over the chart, label stops updating. If I increase the dataset update timer interval to 50-70ms it gets better, but this affects chart FPS.

Can you suggest a workaround for this behavior?
Thanks, Dennis.

UPD: I have found that without <s:SciChartSurface.ChartModifier> timers are fine.
But even an empty ChartModifier group starts to affect it.

  • DENIS K asked 7 years ago
  • last active 3 years ago
0 votes
7k views

Hi, on our data SciChart3DSurface seems a bit laggy while rotating camera, FPS is low. What are general way to improve SciChart3DSurface performance?

1 vote
7k views

Hi,
I have a problem with 2D heatmap performace due to lots of data. I tried some tips to increase performance (rendering priority, resampling etc.) but it is insufficient. I read a scichart forum about 2D heatmap performance and I found answer about possible performance improvement in future (https://www.scichart.com/questions/question/heatmap-2d-performance). I would like to ask you if there is any performance improvement in newer scichart version. Actually I’m working with version 4.0.5.8187.

Thanks for your answer.

  • Jan Lysoň asked 8 years ago
  • last active 4 years ago
0 votes
7k views

Hi,
I’m developing with WPF and trying to get a good perfomance with it.!
enter image description here

As you can see, my component has 4 graphics running at a time, but i need to run my component several times (18-20 instances).
By now if i want it to run at a decent speed I have to run just 1 instance( my computer has 4 cores ). The problem is that when I run it at a colleague’s computer which has 12 cores, it makes impossible to run even with 10 instances.
The question is, how many graphics per core can Scichart support without getting slow?

Thank you.

0 votes
7k views

I am trying to build an application with multiple charts on one screen (3) and each chart annotated with 20-25 annotations.
In total I have 6 FastLineRenderableSeries at once – 2 per chart.
I found serious performance issues after adding more than 10 annotations.

When a user presses a key I go to another set of data. Annotations are created on each data change. I create temporary collection and assign it to the surface annotations collection at once. I also suspend updates through Viewport Manager.

Creation of annotations does not seem to affect the performance, but the rendering of them does.

Most of them are derivatives of AxisMarkerAnnotation and apply a different label template. I tested adding standard Text Annotations instead, just to see whether the custom template had to do something with the performance drop, but it was more or less the same case.
The custom templates are also really simple, it is either a text block or a filled shape, always one component.

Do you have any advises for using a bigger number of annotations?
How to make their rendering faster?

When I remove all annotations the “scrolling” of data goes really smooth.

I am running out of ideas of how to improve.

Best regards,
Paulina

PS Is there any way to try out the other renders before buying a license?

0 votes
7k views

My group is evaluating SciChart for high performance realtime charting. We are testing line renderer with XyDataSeries.
We were able to get good performance, but we need to squeeze more and our scenario is a bit different from how XyDataSeries is used.

To make a long story short, we cannot append, because our application has 2 strict requirements:

  • every data refresh we need to ditch the whole dataset and replace it
    with a new (usually larger) one (no append)
  • we need to display each refresh immediately, even if it means delaying user input (so Immediate. Or Manual with a refresh after
    every step).

which means put in XyDataSeries a new set of points at every step. This means either do:

var dataSeries = new XyDataSeries<double, float>(samples.Length)
dataSeries.Append(domain, samples);
m_renderableSeries.DataSeries = dataSeries;

or :

dataSeries.Clear();
dataSeries.Append(m_domain, samples);

(btw, the first one is slightly faster, 190ms vs 240ms to draw 10 million points)

Which is obviously working against how XyDataSeries is implemented.
A faster way would be to just do

var dataSeries = new ReadOnlyXyDataSeries(domain, samples);
m_renderableSeries.DataSeries = dataSeries;

Where ReadOnlyXyDataSeries just takes the samples array and without any copy makes it available to the renderer.
So I implemented ReadOnlyXyDataSeries as a IXyDataSeries<double, float>.

To my surprise however this performs much worse (900ms to draw 10
million points), while it should perform better (it is really just a
XyDataSeries without copy)

UPDATE: This is not true: I was setting IsSortedAscending = false on sorted data. Once I put it to true, preformances are back to exactly the same performance as XyDataSeries . Which is good but not stellar.

(hack time) I know there is room for performances, because I made the following (hacky, brutal, very bad) thing:

var internalList = (ISciList<float>)dataSeries.YValues;
Array.Copy(samples, internalList.ItemsArray, samples.Length);

instead of the Clear/Append pair, and it is much faster (30ms are shaved off). No copy should be even faster.

Obviously I am missing something. So, what am I missing? How should I implement a custom IXyDataSeries in a fast way? Is there another way?

1 vote
6k views

We are considering using SciChart (WPF), but only if its performance is ‘reasonable’ across Remote Desktop / or via Citrix Server. Have you addressed the known problems of using WPF applications across RDP / Citrix? If so, could you provide some stats as to the performance across RDP?

The reason we are asking is that our current software in which we are using our own high speed rendering is doing fine with a lot of data on the local machine, but is not doing so well across RDP. This is not a huge surprise given the known issues of WPF and RDP (for example see https://stackoverflow.com/a/1005739/246758). We may need to deal with this slowness as more of our customers are using Citrix-servers to run our software.

Any feedback on performance of SciChart across RDP / or using Citrix would be much appreciated!

1 vote
6k views

I am testing scichart and want to plot as much data as possible on a memory constrained system.

Our data is equi-time with no gaps in any of the series. It seems very memory wasteful to have to store an x value per data point per series when these could just be directly infered from the index of the point, this would allow memory usage to be halved.

Is it possible to achieve something similar to this in scichart.

Side question if I have a number of series that all share x values is it possible to use one set of x data for multiple series without it being duplicated in memory.

  • Hugoagogo asked 8 years ago
  • last active 8 years ago
0 votes
6k views

I want to display a line series chart with 3500 series. But the application hangs 20-30 seconds because SciChart is doing something in the UI thread. I’ve read your article “https://www.scichart.com/performance-improvements-scichart-wpf-v5-1/” and set the extension property s:PerformanceHelper.EnableExtremeDrawingManager=”True” and s:PerformanceHelper.EnableExtremeResamplers=”True”. But there is no improvement!
You can reproduce this issue using your example “WaterfallChartDemo” and increase the series count from 50 to 3500.

Why s:PerformanceHelper.EnableExtremeDrawingManager=”True” and s:PerformanceHelper.EnableExtremeResamplers=”True” has no effect?

  • Tobias asked 5 years ago
  • last active 5 years ago
0 votes
6k views

Hi,

When I used scichart real-time graph for 3 days(no stop), It does not draw smoothly.

It looks broken… draw, wait for 1 second, draw, wait…..(repeat)

but first day, It worked well..

Why is it??

I use buffer size(1843200) and draw 80 fast lines.

and Memory in my PC is 16GB.

Please help me to solve this problem….

  • CholJin Ko asked 6 years ago
  • last active 6 years ago
0 votes
6k views

I am using FastLineRenderableSeries with DateTimeAxis for X-axis.

And, I’m using mouse event to get X-axis value use clicked by mouse.

I’m using code below.

Put vertical line at chart where nearest X value exists, when mouse button clicked

But sometimes MouseButtonEventArgs.GetPosition takes time.

Code like this.

        private void chartSurface_PreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
                    if (isInitialized == false) return;

                    PerformanceAnalyzer.Start("chartSurface_PreviewMouseDown");

                    // Get mouse point
                    var mousePoint = e.GetPosition(chartSurface);

                    PerformanceAnalyzer.Check("e.GetPosition(chartSurface)");
        }

Normally.
Performance analyze start:2021/09/09 10:55:47 chartSurface_PreviewMouseDown
Performance analyze check:2021/09/09 10:55:47 elapsed:00:00:00.0027280 e.GetPosition(chartSurface)

When slow
Performance analyze start:2021/09/09 10:55:48 chartSurface_PreviewMouseDown
Performance analyze check:2021/09/09 10:55:48 elapsed:00:00:00.4303424 e.GetPosition(chartSurface)

Is there any good way to get more good and stable performance?

0 votes
6k views

I have a question about the scichart performance. I need to display a lot of data on the real time chart and above 2400000 values the chart crops and reacts very slowly. It was tested on Samsung s7. Does scichart handle that much data on devices? Is there any minimum phone performance requirements?

  • al luk asked 5 years ago
  • last active 5 years ago
0 votes
6k views

I have to show multiple charts in the UI. so, I’m using a ListView and adding SciChart in the DataTemplate.
Please refer the files for more details

After the data is loaded, there is a lot of lag in zoom in, zoom out and Rubberband functionality.

Note: I’ve to load more than 4000 XY values in the series.

Could you please take a look at the same and provide some tips for improving the performance and also let me know if there is any alternative for what I’m doing?

Thanks,
Manoj

0 votes
6k views

Hi,

As part of our evaluation of SciChart a very important point for us is responsiveness, as I mentioned in another post

A point that is causing concerns is that we need to update the UI in a reliable, synchronous, non-deferred way, even if this means blocking the user input. So for us the only method that works is to user RenderPriority.Immediate.

Unfortunately it seems that for complex data were the rendering starts to struggle SciChart just skips updates to the view. We tried to manually force the update using code, but we have the same problem described here (i.e. RenderPriority.Manual does not work).

So, how can we be sure that the UI gets updated every single time we update a DataSeries, regardless of load, user input, whatever?

1 vote
5k views

I tried to create an WPF application that used a graph with LineRenderableSeriesViewModel and XYDataSeries to display real-time data. Cursor inspection was added to the chart as shown in the picture to make it easier to view the data. After some time I found out that when inspecting the cursor, if you move it quickly inside the chart, the CPU load increases several times.

Is there any elegant way to preserve performance with such manipulations?

My computer has a pretty good build but on weaker computers it causes some problems.

  • Processor: AMD Ryzen 7 5825U with Radeon Graphics 2.00 GHz
  • RAM: 16.0 GB (14.8 GB usable)
  • System: Windows 11 Pro (21H2)
1 vote
5k views

In our app we have a feature by which user can add indicators. These indicators can consist of 2 or a maximum of 4 lines.

We don’t want to render svg tooltips(which setted up by the default) with data for each line, instead of that we get point data and pass it to our app inner service that can render indicator legend.

To prevent default tooltips from being displayed we set for each renderable series of an indicator the following values.

rolloverModifierProps.width = 0; rolloverModifierProps.height = 0;

But of course tooltips are still rendered in the DOM and this leads to performance issues when we have 3 or more indicators of this type.

My question is the following

How we can render only circles svg for rollover modifier and completely dont render svg for tooltips in the DOM?

This is what the indicators look like

1 vote
4k views

I have a real time updated chart with very large data size and I am facing the slow client problem. i.e. The data sending speed is faster than the data receiving and handling speed which causes memory growing up issue. I am trying to use Web Workers to increase the data handling speed in frontend. I have found a related post:

https://www.scichart.com/questions/wpf/is-xydataseries-safe-to-being-changed-in-a-separate-thread

It seems possible to update XyDataSeries in the background thread with WPF. My UI is built with NextJS. I tried to use Web Workers to implement multiple threads. But I found that it can’t pass the SciChartSurface or XyDataSeries to the worker thread. Could you show me an example on how to update XyDataSeries in the worker thread with Web Workers?

  • Quyen Sy asked 11 months ago
  • last active 11 months ago
0 votes
4k views

Hello!

I’m building an application where I need to display quiet a large number of charts next to each other.

In this app the user can select up to 16 devices at the same time, each device having 24 channels of measurement data.
So in the worst case there could be 384 charts visible at the same time.
Usually it’s more likely to be around 24 or 48.

The user will also be switching between different views to monitor the devices he’s working with so UI elements need to be reloaded and repopulated more than once.

I have realized that this might not be possible to do with SciChart as loading 24 charts on their own already takes about a second or two.

I already have placed a call to “SciChart2DInitializer.LoadLibrariesAndLicenseAsync().Wait();” in my startup part of my software.
The chart itself is quiet simple and it is placed within an ItemsControl to be populated as many times as required.:

<ItemsControl Grid.Row="1" ItemsSource="{Binding Path=Data}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<s:SciChartSurface
x:Name="sciChartSurface"
Margin="10"
s:ThemeManager.Theme="BrightSpark"
Background="White"
Style="{x:Null}">
<s:SciChartSurface.RenderSurface>
<s:XamlRenderSurface />
</s:SciChartSurface.RenderSurface>
<s:SciChartSurface.YAxes>
<s:NumericAxis
x:Name="reflectanceAxis"
AxisAlignment="Left"
Id="reflectanceAxis"
IsPrimaryAxis="True" />
</s:SciChartSurface.YAxes>
<s:SciChartSurface.XAxis>
<s:DateTimeAxis x:Name="timeAxis" Id="timeAxis" />
</s:SciChartSurface.XAxis>
<s:SciChartSurface.RenderableSeries>
<s:FastLineRenderableSeries XAxisId="timeAxis" YAxisId="reflectanceAxis" />
</s:SciChartSurface.RenderableSeries>
</s:SciChartSurface>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>

Is there any way that I can improve the loading performance even further?

Attached you can find a stripped down sample project which demonstrates the slow load times I’m experiencing.
There is also a picture attached where you can see that loading 24 charts blocks the UI thread for about 1.5 seconds.

I am using the latest SciChart version currently available (6.2.1.13304)

0 votes
4k views

Hi,

we updated to version 6.3 and since then the VisualXcceleratorEngine is no longer used. The fallback type ‘HighQualityRenderSurface’ is always used. What about the auto-select feature for the best GPU?

This is the code we use to check whether DirectX is used:

using (var sciChartSurface = new SciChartSurface())
{
    sciChartSurface.OnRenderException += OnSciChartRenderException;

    VisualXcceleratorEngine.SetIsEnabled(sciChartSurface, true);
    VisualXcceleratorEngine.SetFallbackType(sciChartSurface, typeof(HighQualityRenderSurface));
    VisualXcceleratorEngine.SetDowngradeWithoutException(sciChartSurface, false);
    VisualXcceleratorEngine.SetEnableImpossibleMode(sciChartSurface, true);

    if (sciChartSurface.RenderSurface.GetType() == typeof(VisualXcceleratorRenderSurface))
    {
        // DirectX is enabled!
        retval = true;
    }
    else
    {
        // Restart 2D engine with D3D9   
        VisualXcceleratorRenderSurface.RestartEngineWith(DirectXMode.DirectX9c);

        // For 3D Charts only: Restart 3D engine with D3D9
        //Viewport3D.Restart3DEngineWith(DirectXMode.DirectX9c, FullScreenAntiAliasingMode.None, true);

        VisualXcceleratorEngine.SetIsEnabled(sciChartSurface, true);
        VisualXcceleratorEngine.SetFallbackType(sciChartSurface, typeof(HighQualityRenderSurface));
        VisualXcceleratorEngine.SetDowngradeWithoutException(sciChartSurface, false);
        VisualXcceleratorEngine.SetEnableImpossibleMode(sciChartSurface, true);

        if (sciChartSurface.RenderSurface.GetType() == typeof(VisualXcceleratorRenderSurface))
        {
            // DirectX is enabled!
            retval = true;
        }
    }

    sciChartSurface.OnRenderException -= OnSciChartRenderException;
}

What can I do?

Regards

  • Tobias asked 3 years ago
  • last active 3 years ago
0 votes
3k views

Hello!

We have a SciChart plot application that a customer used to render 192 plots. The issue is that when so many series rendered is that the UI blocks on the initial redraw for about a second.

We have a SciChartSurface with RenderableSeries property bound to an ObservableCollection. We do use SuspendUpdates() when populating the ViewModel collection.

What is a good approach to either speed-up rendering or at least make the UI more responsive while all these plots are rendered?

Thank you in advance for any tips.

0 votes
3k views

Hi,

I’m trying to evaluate the reality of creating multiple realtime charts and I’m hitting a huge performance brick wall.

My application will have high speed streamed data coming in over ethernet. Currently I’m simulating this with a thread timer that updates 100 data objects at 60Hz. Screen data and chart updates I’ve got throttled to 30Hz but it’s still grinding my charts are still struggling. If I move the mouse pointer the charts freeze entirely until the mouse is still.

I want the end user to be able to choose any data object and chart it however they want. Adding charts and adding plots to charts etc. To enable this I’ve created a chart template as a user control and at runtime the charts are added to a panel on a tab control. Event one chart on one tab chugs though. Move the mouse over it and it locks up.

I have a single overview chart with a scrollbar over the top on the parent control. I need this to control the cursor (vertical line) and shared X visible range. Live data is Fifo limited to a 10 second range. All this works, just painfully slowly.

SharedXVisible range is MVVM bound. Renderable series is LineRenderableSeriesViewModel and data is pushed at 30Hz from a Data provider as per this tutorial:
https://www.scichart.com/documentation/win/current/Tutorial%2006b%20-%20Adding%20Realtime%20Updates%20with%20MVVM.html

CPU usage is sub 20%. Max frame rate is 30fps. Render priority doesn’t seem to make much difference, though “immediate” will lock up the whole app. I’m no expert at performance profiling but I’m not getting any clues from ReShaper dotTrace so far.

I tried creating a version that hand almost no binding and used codebehind to update the data. It didn’t seem to help. I’d rather not do this though as I have a lot of things working that I like such as vertical slice, annotations, templates etc.

I’ve got a list of all the live data on the right of the screen and it all updates rapidly, even while the mouse is moving and the charts are frozen.

I’m also using some Syncfusion controls and theming, if it matters.

I must be missing something obvious surely.

<!--  Define Chart  -->
        <s:SciChartSurface x:Name="chart" Grid.Row="0" Grid.Column="0"
                           Background="Black"
                           RenderPriority="low"
                           MaxFrameRate="30"
                           RenderableSeries="{s:SeriesBinding RenderableSeriesCollection}"
                           >

            <!--  Define X and Y Axis  -->
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AutoRange="{Binding AxisYRangeMode}" 
                               DrawMajorBands="False" 
                               DrawMinorGridLines="false" 
                               DrawMajorGridLines="True" 
                               DrawMajorTicks="False" 
                               DrawMinorTicks="False" 
                               VisibleRange="{Binding AxisYVisibleRange}" />
            </s:SciChartSurface.YAxis>

            <s:SciChartSurface.XAxis>
                <s:NumericAxis AutoRange="{Binding AxisXRangeMode}" 
                               BorderBrush="{StaticResource BorderBrushGray}" 
                               BorderThickness="1" 
                               DrawMajorBands="False" 
                               DrawMinorGridLines="False" 
                               DrawMajorGridLines="True" 
                               DrawMajorTicks="False" 
                               DrawMinorTicks="False" 
                               TextFormatting="0" 
                               VisibleRange="{Binding SharedXVisibleRange, Mode=TwoWay}" 
                               s:VerticalSliceModifier.AxisLabelContainerStyle="{x:Null}"/>
            </s:SciChartSurface.XAxis>

            <!--  Modifiers  -->
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:RubberBandXyZoomModifier 
                        IsXAxisOnly="True" 
                        ZoomExtentsY="True" 
                        IsAnimated="True" 
                        RubberBandFill="#20FFFFFF" 
                        RubberBandStroke="GreenYellow" 
                        RubberBandStrokeDashArray="2 2">
                    </s:RubberBandXyZoomModifier>

                    <s:ZoomExtentsModifier IsAnimated="True"/>

                    <s:MouseWheelZoomModifier IsEnabled="True"/>

                    <s:XAxisDragModifier IsEnabled="True" DragMode="Pan"/>

                    <s:LegendModifier x:Name="legendModifier"
                                      Background="Transparent" 
                                      Margin="10" 
                                      GetLegendDataFor="AllSeries" 
                                      LegendItemTemplate="{StaticResource CustomLegendTemplate}" 
                                      ShowLegend="True" ShowVisibilityCheckboxes="True"/>

                    <s:VerticalSliceModifier Name="sliceModifier">

                    <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation Style="{StaticResource sliceStyle}" 
                                                      X1="{Binding SlicePosition, Mode=TwoWay}"/>
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>

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

Thanks in advance,
Declan.

PS. I’m trying to attach a screenshot but it keeps saying “Forbidden”.

0 votes
3k views
  1. Open Firefox.
  2. Go to scicharts demos, for example https://demo.scichart.com/javascript-multi-pane-stock-charts

Rendering speed is much slower than in Google Chrome; scrolling is freezing.
Also there are several errors and warnings in console.

1 vote
3k views

I am using SciChart with Next.js to create a real-time updated line chart. It works fine if there is 1 trace running with 130k datapoints. But when there are 4 traces (each with 130k datapoints) running in the chart, there is performance issue. After running for a while, this error is showing in the browser console:

“RangeError: Failed to execute ‘texImage2D’ on ‘WebGL2RenderingContext’: The ArrayBuffer/ArrayBufferView size exceeds the supported range.”

I tried to optimize the chart by following this page, but it doesn’t help on the lag issue.
https://www.scichart.com/documentation/js/current/Performance%20Tips.html

Here are my codes for updating the chart data:

if (SciChartSurface.renderableSeries.get(trace_num)) {
    SciChartSurface.renderableSeries.get(trace_num).dataSeries = new XyDataSeries(WasmContext, { xValues: dataX, yValues: dataY });
} else {
    const lineSeries = new FastLineRenderableSeries(WasmContext);
    lineSeries.strokeThickness = 1;
    lineSeries.stroke = tracesInfoRef[trace_num].color;
    lineSeries.dataSeries = new XyDataSeries(WasmContext, { xValues: dataX, yValues: dataY, dataIsSortedInX: true, dataEvenlySpacedInX: true, containsNaN: false });
    SciChartSurface.renderableSeries.add(lineSeries);
}

Can SciChart perform well with multiple traces which total datapoints larger than 500k? How can I fix the texImage2D error ?

1 vote
2k views

Hello,

we are building an application where Charts are created/placed by the user in a form of editor.

We observed that the creation of the first Chart takes between 1 to 3 seconds (depending on the system) but the creation of subsequent Charts takes virtually no time (as it should be).

We assume that the creation of the first Chart involves some kind of time consuming initialization that is later used in the creation of subsequent Charts.

So we have researched if there is a way to do this initialization at the start of our application, so the user is not inconvenienced by a three second waiting time while placing the first Chart.

We discovered the “LoadLibrariesAndLicenseAsync”-function. However, it looks like it has no measurable effect.

Maybe we are using it wrong?

Here is an example code to illustrate the problem in a condensed manner:

Two charts are created and each time the time it takes to create them is measured.

The first creation takes about 1600 milliseconds, the second one only 2.

How can we make both creations only take a few milliseconds?

Thank you.

        // SciChartSurface.SetRuntimeLicenseKey("our key");

         await SciChart.Charting.Visuals.SciChart2DInitializer.LoadLibrariesAndLicenseAsync(
           "our key",
            null); //...does not seem to work

        Stopwatch sw = new Stopwatch(); 
        sw.Restart();//start stopwatch

        //creating the first Scichart with test data:

        SciChartSurface sciChartSurface = new SciChartSurface();

        XyDataSeries<double, double> xyDataSeries = new XyDataSeries<double, double>();
        xyDataSeries.AcceptsUnsortedData = true;
        FastLineRenderableSeries fastLineRenderableSeries = new FastLineRenderableSeries();
        fastLineRenderableSeries.DataSeries = xyDataSeries;
        sciChartSurface.RenderableSeries.Add(fastLineRenderableSeries);

        NumericAxis m_xAxis = new NumericAxis();
        NumericAxis m_yAxis = new NumericAxis();
        m_yAxis.AutoRange = AutoRange.Always;
        sciChartSurface.XAxis = m_xAxis;
        sciChartSurface.YAxis = m_yAxis;

        using (xyDataSeries.SuspendUpdates())
        {
            for (int i = 0; i < 100; i++)
                xyDataSeries.Append(i, Math.Sin(i));
        }

        Screen.Children.Add(sciChartSurface);//add first Scichart to grid
        sciChartSurface.Margin = new Thickness(0, 0, 500, 0);

        MessageBox.Show("time: "+sw.ElapsedMilliseconds); //////////  1610 Mlliseconds
        sw.Restart();//restart stopwatch

        //creating the second Scichart with test data:

        SciChartSurface sciChartSurface2 = new SciChartSurface();

        XyDataSeries<double, double> xyDataSeries2 = new XyDataSeries<double, double>();
        xyDataSeries2.AcceptsUnsortedData = true;
        FastLineRenderableSeries fastLineRenderableSeries2 = new FastLineRenderableSeries();
        fastLineRenderableSeries2.DataSeries = xyDataSeries2;
        sciChartSurface2.RenderableSeries.Add(fastLineRenderableSeries2);

        NumericAxis m_xAxis2 = new NumericAxis();
        NumericAxis m_yAxis2 = new NumericAxis();
        m_yAxis2.AutoRange = AutoRange.Always;
        sciChartSurface2.XAxis = m_xAxis2;
        sciChartSurface2.YAxis = m_yAxis2;

        using (xyDataSeries2.SuspendUpdates())
        {
            for (int i = 0; i < 100; i++)
                xyDataSeries2.Append(i, Math.Sin(i));
        }

        Screen.Children.Add(sciChartSurface2);//add second Scichart to grid
        sciChartSurface2.Margin = new Thickness(500, 0, 0, 0);

        MessageBox.Show("time: "+sw.ElapsedMilliseconds); //////////////////////////// 2 Mlliseconds
1 vote
2k views

Hello SciCharts Team,

I have multiple data series of <date, double> Type with no:of sample points ranging in the magnitude of Millions (Not realtime). Is there a way to have a blanket model graph fitting available for the data out of the box? Right now even with default resampling provided by the Sci charts, the number of points plotted on the screen is more than what is optimal. I looking for a solution, where I can keep a constant n data points on the screen irrelevant of the zoom state.

I have attempted to use the resampling on the IRenderableSeries as provided by default by the Sci charts. Please find the screenshots for those graphs attached. The graph is not visually appealing or hard to analyze because of the high data point density. This is the major reason why I’m requesting an alternative/method to improve the visualization.

I have achieved this previously by a resampling strategy to show a maximum of n points on the screen. Let’s say the screen accommodates 2k points (n = 2k) for example, (sample total) 2M points will be aggregated to 6000k points, 2k as average, 2k as max, and 2k as min. Just an idea for thought. I’m sure there might be better ways of doing this. Please provide me with some suggestions to improve this scenario.

Thanks,
Arjun

1 vote
2k views

Hello,

i’m trying to build a chart using a Stripe Data series, on the X axis i have a DatetimeAxis while on Y axis i have a Numeric.

I have an observable collection of IRenderableSeriesViewModel, and when i try to add a StripeRenderableSeriesViewModel if the dataseries contains many elements (>2000) it logs this exception below:

Exception thrown: ‘System.InvalidCastException’ in System.Private.CoreLib.dll
SciChartSurface didn’t render, because an exception was thrown:
Message: Invalid cast from ‘Double’ to ‘DateTime’.
Stack Trace: at System.Double.System.IConvertible.ToDateTime(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at SciChart.Charting.Model.DataSeries.StripeDataSeries2.rwx(ResamplingParams gib, StripePointSeries gic)
at SciChart.Charting.Model.DataSeries.StripeDataSeries
2.ToPointSeries(ResamplingParams resamplingParams, ResamplingMode resamplingMode, IPointResamplerFactory factory, IPointSeries lastPointSeries)
at dih.lay(AxisCollection gg, IRenderableSeries gh, RenderPassInfo gi, IPointResamplerFactory gj, Boolean gk, IDataSeries& gl, IndexRange& gm, IPointSeries& gn, Int32& go)
at dih.lax(ISciChartSurface gd, Size ge, Boolean gf)
at dih.RenderLoop(IRenderContext2D renderContext)
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()
Exception thrown: ‘System.Threading.SynchronizationLockException’ in SciChart.Drawing.dll
SciChartSurface didn’t render, because an exception was thrown:
Message: Object synchronization method was called from an unsynchronized block of code.
Stack Trace: at System.Threading.Monitor.Exit(Object obj)
at irv.hds(jbq r, SCRTRenderContext s)
at jbv.Dispose()
at SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()

Binding and data i’m pretty sure are ok since with fewer data it works fine

EDIT: i was able to reproduce the issue in the wpf sample project (repo), just replace GanttChartViewModel.cs with the sample one i have attached here and it can be reproduced by navigating to the Gantt chart example

1 vote
1k views

I remember asking about something similar many years ago with WPF, but in browser the problem seems more apparent.

Using the current data model (I can be fairly flexible on the backend, and don’t necessarily have to do things this way), for some of the plots I generate many series that do some funky overlapping stuff (example attached). In the extreme examples, this can be thousands of series (the total number of data points might be < 100k).

In these cases, drawing basically grinds to a halt. Zooms take seconds, the OS starts complaining that chrome is locked up — you get the idea.

Is there a better way to approach this sort of plot? Are there any tuning recommendations for this scenario?

1 vote
1k views

This question is related to this.

I still see a problem with memory accumulation and I just can’t cope with it. For clarity, I created a simple example with the simplest graph, two axes, one line series and 10,000 values in this graph.

When the page loads, no code is executed and there is only a button that creates one graph, adds it, waits 3 seconds and deletes it.

I use this button to test the speed and the fact of memory accumulation. For the simplest test, it is enough to simply create a certain number of times and wait for the graph to be deleted. After which it is clear that after some time the memory will not return to its previous values.
Example: after loading the page, memory consumption was about 30-40 MB, after creating and deleting 15 graphs (one by one), the memory was already 105 MB

Thus, with each graph, memory leaks.

Also, to test and search for memory leaks, I used the three snapshot technique:
1) created, for example, 2-3 graphics one by one
2) took a snapshot
3) created an even number of charts (for example, 10 or 25)
4) took a snapshot
5) created one or two more graphs
6) took a snapshot

7) I opened the 3rd Snapshot and looked at the result of the objects distributed between Snapshots 1 and 2. Every time I see the same exact values of 10 or 25 or multiples of them.

Can you please look at the code, at creation and deletion, repeat this test to understand where this memory is leaking from.

Thanks in advance for your answer. I hope the problem will be found.

Zip file upload has been forbidden.
Link to GoogleDrive: https://drive.google.com/file/d/177QFurYZwnnd5Hp9a9jQV2z4nt6ULhkX/view?usp=sharing

0 votes
1k views

This question is related to this.

Good afternoon. While researching this question, I created an example that I would like you to look at.

1) In this example, there is an express server that hosts an HTML page.
In it I added 3 buttons that trigger the creation of a certain number of charts and their subsequent deletion (1, 10 or 100). And one button that saves data about the memory used (later a chart is created from this data for visual analysis).

2) In the check_result folder there is an html file containing one button that creates a chart based on the data saved on site #1.

The algorithm of actions is as follows:
1) I create 1 chart. I’m waiting for it to be removed
2) I wait some time for the result to be readable
3) I create 10 charts. I’m waiting for them to be removed
4) I wait some time for the result to be readable
5) I create 100 charts. I’m waiting for them to be removed
6) I wait some time for the result to be readable
7) I create 1000 charts. I’m waiting for them to be removed
8) I wait some time for the result to be readable

I am attaching a screenshot of the final chart. The final graph also displays the places where the creation of charts began and the end of the deletion of the last one.

Result: After adding charts, the memory does not return to its previous position.

Please look at this example. If I’m wrong somewhere, tell me how this example can be made to free all memory after deleting all charts. Thanks a lot!

Youtube video with example: https://youtu.be/tyjUSp0zA_o
GoogleDrive with zip file: https://drive.google.com/file/d/1LHoFLtovTto-4uRPcFeu2xeasGc2G3cQ/view?usp=sharing

1 vote
1k views

Hi!

I have chart with mountain series with a palette provider.
It performs extremely well with 50k points.

However, I noticed that when I drag the chart away, to a point where the series is not visible, the performance sinks and the chart is extremely laggy.

I have uploaded my code to codepen: https://codepen.io/robrob123/pen/KKJjyvp

I checked the performance using the chrome performance profiler and I found that a function called applyStrokeFillPalletting is called repeatedly many times and each time it takes way too long to execute, considering there is no series to draw.

I have attached a screenshot showing the performance profiling.

Thank you!

Showing 48 results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies