Pre loader

Forums

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
3k views

Hello there,

I just updated SciChart from 6.4.0.13629 to 6.5.1.26063.

We used the mentioned function to export a chart to PNG as a stream, to include it in our PDF generation.

I played around with the parameters, but none seemed to work.

Since the update, we encounter the following exception:

System.InvalidOperationException: 'UIElement.Measure(availableSize) cannot be called with NaN size.'
   at System.Windows.UIElement.Measure(Size availableSize)
   at SciChart.Charting.Visuals.SciChartSurface.PrepareSurfaceForExport(Double width, Double height)
   at SciChart.Charting.Visuals.SciChartSurface.CreateCloneOfSurfaceInMemory(Size newSize)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.qem(Boolean pu, Nullable`1 pv)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.qel(ExportType pr, Boolean ps, Nullable`1 pt)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.ExportToStream(ExportType exportType, Boolean useXamlRenderSurface, Size size)
0 votes
7k views

Hi!

I want to create a graph, where vertical line annotations are displayed at each column of a chart. I
have the vertical line annotations created like this:

xaml:

code behind

        statisticsChartAnnotations = new AnnotationCollection();
        Style sliceStyle = App.Current.FindResource("sliceStyle") as Style;
        if (displayedChartSeries.Count > 0)
        {
            foreach (DateTime datapoint in displayedChartSeries[0].DataSeries.XValues)
            {
                VerticalLineAnnotation a = new VerticalLineAnnotation()
                {
                    Style = sliceStyle,
                    X1 = datapoint,
                    IsEnabled = false,
                };
                StatisticsChartAnnotations.Add(a);

            }

        }

But when I display the first chart, the annotations are displayed by an offset from the columns. When i switch to the next chart, the annotations jump to the right positions. I attached a picture of the problem. First charts shows the initial positions.

I already tried refreshing the surface through viewportmanager and dataseries. Is this a known bug? is there any workaround? Is there a way to render the annotations right to the data points?

Thanks,
Kristóf

1 vote
6k views

Hello,

I want my HeatmapColorMap to be part of my chart, so that when I export it, the HeatmapColorMap is visible on the PNG / XPS.
In order to this, I put the HeatmapColorMap inside a CustomAnnotation.
I can see it nicely on my Surface but when I try to export it as XPS or as PNG with some specific size, the numbers and ticks have disappeared, only leaving the rectangle with color gradient (see attached picture)
Is there a way to solve this ?

Thank you !

0 votes
5k views

Hello ,

I have created a SimpleScatterChart3D application using the dll’s from SciChart Official Releases NuGet Feeds (myget) and when i plotted 20 thousand data points to the chart i am getting Access Violation Exception in SciChart.Charting.dll .

Can you please let us know how can i resolve this issue.

Thanks

0 votes
13k views

Hi,

I’ve been looking through ways to have to y-Axis scale for really small changes/values.

For example, I’m attempting to plot 10 values between 0.99300 to 0.99400, and the changes between points can vary between 0.001 to 0.0001 or so (basically, really small changes)

However, my y-Axis seems to always start at 0 and the y-Axis major ticks are always at most a 0.1 difference, making the graph look flat.

I’d like to achieve the following:
– Scale to the smallest value i can scale to.
– Have my y-Axis to not necessarily start at 0.

I’ve tried the following:

Setting up y-Axis:

    self.yAxis = [SCINumericAxis new];
    [self.yAxis setStyle:axisStyle];
    self.yAxis.axisId = @"yAxis";
    [self.yAxis setGrowBy:[[SCIDoubleRange alloc]initWithMin:SCIGeneric(0) Max:SCIGeneric(0.1)]];
    [self.yAxis setAutoRange:SCIAutoRange_Always];
    [self.chartSurface attachAxis:self.yAxis IsXAxis:NO];

Regards.

0 votes
10k views

Hi
Is there a way to just change the values of the pie segments so it get updated on the donut chart.
If I remove and add the pie segments again it works, is this the correct way?

Also I can’t find any documentation around the donut for android/xamarin

regards
Per

0 votes
11k views

When I have cursor tooltips enabled, showing the y-values, they display properly until the y-valuse for the 1st series is below the axis y-min. Below the tooltip y-values are showing correctly
Tootip displaying correctly

If I move the mouse to the left, below 25 Hz, the tooltip disappears as below.
How can I correct this?

Missing tooltip
Thanks,
Robert

0 votes
15k views

What is the recommended way to use the same text formatting for both Axis and Annotation labels?

There are two scenarios.

  1. When DateTimeAxis automatically change the format

When zooming DatetimeAxis, it automatically changes the text format in the label. For example if XAxis visible range is few seconds, it changes the format as HH:mm:ss. But still the annotation label shows the date. Please see attachement : DatetimeAxisAnnotationLabel.PNG

<sciChart:SciChartSurface.XAxis>
        <sciChart:DateTimeAxis Name="XAxisStartTime" AxisTitle="Start Time"/>
</sciChart:SciChartSurface.XAxis>
  1. When XAxis has got a LabelFormatter

If there is a LabelFormatter, what is the recommended way to apply the same formatting for Annotation Label text?
Please see attachement : LabelFormatterAnnotationLabel.PNG (annotation label shows number of milliseconds)

<sciChart:SciChartSurface.XAxis>
<sciChart:NumericAxis Name="XAxisDuration" AxisTitle="Duration" LabelFormatter="{StaticResource TimeDurationAxisFormatter}" AxisMode="Logarithmic" />
</sciChart:SciChartSurface.XAxis>

Thanks!

0 votes
8k views

I got this problem:

Any idea how to resolve this:

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools>sgen.exe /assembly:F:\AMSV2\AMS\bin\Debug\AMS.exe
Microsoft (R) Xml Serialization support utility
[Microsoft (R) .NET Framework, Version 4.6.81.0]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: Unable to generate a temporary class (result=1).
error CS0433: The type ‘XamlGeneratedNamespace.GeneratedInternalTypeHelper’ exists in both ‘f:\AMSV2\AMS\bin\Debug\SciChart.Charting.dll’ and ‘f:\AMSV2\AMS\bin\Debug\AMS.exe’
error CS0433: The type ‘XamlGeneratedNamespace.GeneratedInternalTypeHelper’ exists in both ‘f:\AMSV2\AMS\bin\Debug\SciChart.Charting.dll’ and ‘f:\AMSV2\AMS\bin\Debug\AMS.exe’

  • Rui Graca asked 7 years ago
  • last active 7 years ago
0 votes
6k views

Hello,

As you have already the examples of the EEG -50 channel, Is it possible to set the sensitivity factor for the channels to show the graph.
Basically, this will set the amplitude based on the frequency variation example 7micro volts/millimeter (7microvolts/mm) for each channel. Is there any way we can do it using Scichart, please let us know.

Appreciate your help

Regards,
Aditya

1 vote
2k views

Hi,

I’m trying to add point markers to a scatter series that have transparent fill and coloured stroke. It works but the behavour of the stroke thickness isn’t quite as expected.

Any thickness about 1 starts to clip the square that the sprite is drawn in, making ellipses look square.

SquarePointMarker only seems to draw the stroke on the top and left sides.

TrianglePointMarker clips the stroke at the top and bottom.

I can’t seem to find any other properties that might change this. Padding seems to have no effect.

The following code gereates the point markers:

public static IPointMarker CreatePointMarker(PointMarkerTypes pointType, double size, double strokeThickness, Color fill, Color stroke)
        {
            // Square
            if (pointType == PointMarkerTypes.Square)
            {
                var square = new SquarePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size,
                };

                return square;
            }

            // Triangle
            if (pointType == PointMarkerTypes.Triangle)
            {
                var triangle = new TrianglePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return triangle;
            }

            // Inverse Triangle
            if (pointType == PointMarkerTypes.InverseTriangle)
            {
                var invTriangle = new InvertedTrianglePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return invTriangle;
            }

            // X
            if (pointType == PointMarkerTypes.X)
            {
                var x = new XPointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = fill,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return x;
            }

            // Cross
            if (pointType == PointMarkerTypes.Cross)
            {
                var cross = new CrossPointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = fill,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return cross;
            }

            // Circle
            else
            {
                var circle = new EllipsePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size,
                };

                return circle;
            }
        }
0 votes
11k views

I’m implementing exporting charts. As part of my export, the user can specify the size of the chart. I’ve managed to get sciChartSurface.ExportToBitmapSource() working fine for single graphs.

However, I’ve got some quite complex layouts, and when I try to render parent controls that contain Scichart controls manually, with say:

ExportUIElement.Measure(size);
ExportUIElement.Arrange(new Rect(size));

 int dpiScaling = 3;
RenderTargetBitmap bmp = new RenderTargetBitmap(Width * dpiScaling, Height * dpiScaling,
                                                                                                           96 * dpiScaling, 96 * dpiScaling,
                                                                                                           PixelFormats.Pbgra32);

I’m finding everything working, the chart layout & axis/labels update and render fine, but the chart content is not re-rendered to the new size, causing some messy/strange visual effects. This one was arranged to a larger size, you can see that the actual chart content is now sitting snugly in the middle of a large margin:

enter image description here

Can I force Scichart to re-render these so I can manually render the component in a different size?

  • Ken Hobbs asked 7 years ago
  • last active 5 years ago
0 votes
10k views

with Version 3.61.0.7847 I can set Runtime license without problem
with v4.0.30319 the message “Der Typeninitialisierer für “” hat eine Ausnahme verursacht.” appear

Has anybody a solution?

1 vote
3k views

Hi,

I am using SciChart trial version to create a a simple line chart but when running an application for a while, I got this error in the dev console log – not sure what the root cause is but it seems to come from SciChart library

screenshot

  • Atanai W. asked 2 years ago
  • last active 2 years ago
0 votes
7k views

Hi

I have experienced some performance issues when accessing YMin & YMax properties of data series containing lots of NaN’s.

I have a chart with the following setup:

XAxis = DateTime / YAxis = Numeric
1 FastLineRenderableSeries series / XyDataSeries<DateTime, double>

I have prefilled the data series with 1 million datapoints. Some of the values are randomly made NaN’s.

If 1/2 of the Y values are NaN’s – accessing YMin or YMax property takes ~117ms.
If 1/10 of the values are NaN’s it “only” takes ~27 ms.
…and if no NaN’s are added to the data series – it takes ~3ms;

This is a huge problem for us – as we have large data series including lots of NaN’s – and we must access the YMin / YMax each time data is added to do special scale fitting. This is normally once per second – but with up to 20 data series – (117ms * 2 *20 ) it takes over 4 seconds.

If I have 10 million datapoints – it takes 10 times as long – so it looks like it is recalculating the min/max each time.

/Flemming

0 votes
3k views

Hi, i am evaluate your charting component and try Digital analyser performance demo and put rendering to software and it looks like its missing 99.9% of points even resampling is set off? so what iam doing wrong?

  • Ime Parsaa asked 2 years ago
  • last active 2 years ago
0 votes
1k views

My code is as below

for (int i = 0; i < plot.ZData.Length; i++)
{
var xData = plot.XData[i];
var yData = plot.YData[i];
for (int j = 0; j < xData.Length; j++)
{
dataSeries[i, j] = yData[j];
}
}

Here Z values and X values are linear and Y values are in Logarthimic scale.
I have used Z and Y axis as NumericAxis3D and X is LogarithmicNumericAxis3D .

Is something wrong here? Please suggest.

1 vote
5k views

Hi everyone,

I am using SciChart trial in Angular and I find it so powerful
Thanks for developing this
However, I am having some troubles using it with plotting realtime stock data

From having searched around I found that it is recommended to use CategoryAxis for stock charts to avoid gaps on days without data
However, how do I append/update the data with new data coming in
XYDataSeries.append takes a number for the x-value

In the code below, assume “addNewData” is called every second
How do I properly add the new data with the new DateTime and also format it however i would like

Thanks for your help

  sciChartSurface.xAxes.add(new CategoryAxis(wasmContext));
  sciChartSurface.yAxes.add(new NumericAxis(wasmContext,{
    axisAlignment: EAxisAlignment.Left,
  }));

  addNewData(){
    const x = new Number(new Date()).toString()
    if(this.sciChartSurface){
      const series = this.sciChartSurface.renderableSeries.get(0);
      const dataSeries = <XyDataSeries> series.dataSeries;
      const x = dataSeries.count();
      const y = Math.random()
      dataSeries.append(x, y)
      this.sciChartSurface.zoomExtents()
    }
  }
1 vote
10k views

Hi

I have come across that Android Scichart consuming a lot of memory while drawing it on the surface. It increase more with the time. When i run the android memory profiler, i find out 60-65 % memory consumed by the Graphics only. The app getting started hangs after some time and become unresponsive. Please let me know how to improve the memory utilization.

0 votes
4k views

This is what I want it to look like: (see 1.jpg)

This is what (see 2.jpg) it does look like if I leave setIsLabelCullingEnabled enabled (all labels are culled except if I zoom WAY in)
This is what (see 3.jpg) it does look like if I turn off setIsLabelCullingEnabled

I would expect #2 to look like #3 without either one of the 20/15% and either 1% or 1.25% culled, when culling is enabled.

First things the specific values/locations are precise, I need those lines and labels exactly where they are. So I had to create my own LogarithmicNumericTickProvider and feed it all the numbers; this worked great and the numbers are where they need to be — but apparently using our own LogarithmicNumericTickProvider totally breaks culling. Any ideas on how we can get culling to work with our own LogarithmicNumericTickProvider. Is their another way to do this without using our own LogarithmicNumericTickProvider.

0 votes
7k views

Hello again,

I’m working with the 2D Heatmap. I am setting the DrawMajorGridlines to true but they aren’t showing up. I then realized that I could set the Opacity of the series to something different than 1 and the gridlines are shown.

The problem with this is that I want my series background (i.e. all the places where my heatmap has no data double.NaN) to be shown in white, but setting the opacity to something different than 1 makes the background black.

I have tried to set the background to almost anything (Surface, Series, GridLinePanel) and it’s not affecting it.

Am I missing something?

I attach an image.

Thank you.
Kind regards,
Sebastian

0 votes
14k views

Hi guys,

I am having difficulties setting the background of my bar chart with SCICategoryDateTime X axis since I switched to 2.0.

As far as I understand, just setting the background property of the SCIChartSurface should suffice.
These are all of the things I’ve tried:

1. [self.barSurface setBackgroundColor:[UIColor clearColor]];
2. [self.barSurfaceView setBackgroundColor:[UIColor clearColor]]; 
3. self.barSurface.renderableSeriesAreaFill = [[SCISolidBrushStyle alloc] initWithColor:[UIColor clearColor]];
4. [self.barSurface.renderSurface setIsTransparent:YES];

I didn’t find any other way of setting it, but it still remains black. Any thought on what might cause it?

EDIT: I just found out about this color setting:

[axisStyle setGridBandBrush:[[SCISolidBrushStyle alloc] initWithColor:[UIColor whiteColor]]];

The result I got was a black and white chess board, as shown on the attached picture. I really don’t understand this behaviour. If I set this gridBandBrush to nil, columns are coloured with random colours, so the chart looks like a rainbow. I understand why is this happening but shouldn’t there be a default colour in case brush is nil?

EDIT 2: While debugging using “Capture view hierarchy” in XCode I discovered that render surface is actually white inside debugger. Perhaps it will give more insight to you, it doesn’t mean much to me – I guess it’s because rendering is done on GPU and the context is not available to the debugger.

Best,
Igor

  • Igor Peric asked 7 years ago
  • last active 6 years ago
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
11k views

Dear Support, I have SciChartSurface in fragment (Xamarin Android). I added Xaxis (DateAxis), Yaxis (NumericAxis), standard modifiers and few XyDataSeries as FastLineRenderableSeries. Everything is working fine (screenshot 1). But something strange is happen when fragment with chart is Paused -> Stopped and then Started -> Resumed. Xaxis and Yaxis are not visible. All dataseries are not visible. But I debugged and all data is there. Even rolloverModifier is still working and correct data values are displayed in labels (screenshot 2). It does not happen every time – it depends on what external intent stopped fragment.

I’ve tried reinitialize chart (clear Xaxis, Yaxis, remove modifiers, remove renderableSeries are reinit all with new variables) and it does not help. Only fragment dettach -> attach helps or screen orientantion change (it reinitializes fragment)

Could you tell me any suggestion what can I check or how to force to redraw whole SciChartSurface? (hiding it and showing it does not help – effect is the same. Only fragment dettach and attach helps (this is my workaround at the moment).

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 ?

0 votes
5k views

We have big trouble with SciChart 6.1. First was the initial loading time. But there is this async loading workaround.
Now if we try to render a simple (not large) signal into the chart, it hangs in the rendering loop. No exception, high CPU usage.
Any solution for this issue?
enter image description here

It works on some, but it fails on most of our PCs/Laptops.

  • Tobias asked 4 years ago
  • last active 4 years ago
1 vote
8k views

Hi,
I’m trying to add Data Point Selection in 3D Surface. I followed this example (https://www.scichart.com/example/wpf-chart/wpf-3d-chart-example-simple-select-scatter-point-3d-chart/) but it didn’t work.

Point MetaData is added for each point:

 _model = new ScatterRenderableSeries3DViewModel()
 {
      DataSeries = _dataSeries,
      StyleKey = "ScatterSeries",
      PaletteProvider = new PointCloudPaletteProvider(),
      PointMarker = marker
 };

 RenderableSeries = new ObservableCollection<IRenderableSeries3DViewModel>()
 {
      _model
 };
public void AppendPositionData(double x, double y, double z)
{
    var vertex = new PointMetadata3D(Colors.Coral, 10);
    _dataSeries.Append(x, y, z, vertex);
}

Vertex Selection Modifier is added to group

        <s3D:SciChart3DSurface.ChartModifier>
                <s3D:ModifierGroup3D>
                    <s3D:FreeLookModifier3D ExecuteOn="MouseLeftButton" ExecuteWhen="Shift" />
                    <s3D:OrbitModifier3D ExecuteOn="MouseLeftButton" />
                    <s3D:VertexSelectionModifier3D ExecuteOn="MouseLeftButton" ExecuteWhen="None" />
                    <s3D:MouseWheelZoomModifier3D />
                    <s3D:ZoomExtentsModifier3D AnimateDurationMs="500"
                                               ResetPosition="300,300,200"
                                               ResetTarget="0,0,0" />
                </s3D:ModifierGroup3D>
            </s3D:SciChart3DSurface.ChartModifier>
        </s3D:SciChart3DSurface>

Now, when click to a point on the surface, IsSelected property seems not be set.
Please suggest a way to fix this issue! Thanks.

0 votes
7k views

Hi, guys

I want to show two renderableSeries on one chart view. These series have common x-axis (SCICategoryDateTimeAxis) and separate y-axes(SCINumericAxis). Only one of y-axis is visible at chart view. Also the data series of visible renderable series updated by scrolling to left or to right. So for displaying on one view i’m using:

[y1Axis setGrowBy: [[SCIDoubleRange alloc] initWithMin:SCIGeneric(0.3) Max:SCIGeneric(0.07)]];
[y2Axis setGrowBy: [[SCIDoubleRange alloc] initWithMin:SCIGeneric(0.0) Max:SCIGeneric(5)]];

So it’s look good at start (Correct_zooming.png). But after some scrolling it decrease axis extents of invisible y-axis (decrease.png).
Or even breaks down (broken.png)

For test i’m using SCIFastOhlcRenderableSeries and SCIHorizontallyStackedColumnsCollection readerable series.
Data series for SCIHorizontallyStackedColumnsCollection is initializated like:

    [volumeSerie1 updateAt:index Y:SCIGeneric(100000 / [multiplier doubleValue])];
    [volumeSerie2 updateAt:index Y:SCIGeneric(500000 / [multiplier doubleValue])];

So can you look at it?
Or what way i should implement this behavior?

Best regards,
Sushynski Andrei

1 vote
816 views

Hello.
I’d checked examples from your Demo ‘SciChart.Examples.Demo’ and looks like the example “SciChart.Examples.Examples.CreateRealtimeChart.UsingSeriesValueModifier” is applicable for me because I need functionality like this.

But as I understand Legend as LegendModifier component is a part of chart and it ‘know’ about chart data and can manipulate layout of it. In my application I want to have chart settings not in chart layout but in separate part of application. Can I bind chart settings with my custom controls? At start I want to set visibility for chart series which created in code

        private XyDataSeries<double, double> _lineDataDiameter1;
        private XyDataSeries<double, double> _lineDataDiameter2;
        private XyDataSeries<double, double> _lineDataCovering1;
        private XyDataSeries<double, double> _lineDataCovering2;
        private XyDataSeries<double, double> _lineDataCovering3;

private void InitCharts()
    { // TODO names and color maybe make as settings
        _lineDataDiameter1 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_DIAMETER_1, LineColor = Colors.OrangeRed, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
        _lineDataDiameter2 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_DIAMETER_2, LineColor = Colors.BlueViolet, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
        _lineDataCovering1 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_1, LineColor = Colors.LimeGreen, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
        _lineDataCovering2 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_2, LineColor = Colors.DeepSkyBlue, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
        _lineDataCovering3 = InitChart(new InitChartRequest() { ChartName = CHART_NAME_COVERING_3, LineColor = Colors.White, ChartStyle = CHART_LINE_STYLE, LineThickness = CHART_LINE_THICKNESS });
    }

    private XyDataSeries<double, double> InitChart(InitChartRequest request)
    {
        XyDataSeries<double, double> lineData = new()
        {
            SeriesName = request.ChartName,
        };

        RenderableSeries.Add(new LineRenderableSeriesViewModel()
        {
            StrokeThickness = request.LineThickness,
            Stroke = request.LineColor,
            DataSeries = lineData,
            StyleKey = request.ChartStyle,
        });

        return lineData;
    }

And additional little question. How can I make CursorModifier visible or not?

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

Even if I make it like this

                <s:SciChartSurface.ChartModifier>
                    <s:ModifierGroup>
                        <s:SeriesValueModifier/>
                        <s:CursorModifier Visibility="Hidden"/>
                    </s:ModifierGroup>
                </s:SciChartSurface.ChartModifier>

I see it

1 vote
2k views

Implementation scenario: multiple polylines are displayed. After clicking the polyline, the name of the polyline is displayed in the icon.

Question: I can get the Series Name through the SeriesSelectionModifier now, but I don’t know how to display the Series Name in the chart when the user clicks a polyline. Is there a corresponding API?

1 vote
1k views

Error from chart in div instrument_candle_chart_2
RuntimeError: call_indirect to a signature that does not match (evaluating ‘invoker(fn, thisWired, arg0Wired, arg1Wired, arg2Wired, arg3Wired, arg4Wired, arg5Wired, arg6Wired, arg7Wired, arg8Wired)

error here: OhlcSeriesDrawingProvider.prototype.draw:

this.nativeDrawingProvider.DrawPointsVec(nativeContext, xDrawValues, openValues, highValues, lowValues, closeValues, renderPassData.xCoordinateCalculator.nativeCalculator, renderPassData.yCoordinateCalculator.nativeCalculator, this.args);

0 votes
12k views

I’ve implemented the following ContextMenu:

  <s:SciChartSurface.ContextMenu>
            <ContextMenu>
                <MenuItem x:Name ="header1" Header="Einfügen" Command="{Binding InsertItem}" IsEnabled="{Binding SelectedElementsCount,Converter={StaticResource BoolToOppositeBoolConverter}}" />
                <MenuItem Header="Entfernen" Command="{Binding RemoveItem}" />
                <MenuItem x:Name ="header2" Header="Ändern" Command="{Binding ChangeItem}" IsEnabled="{Binding SelectedElementsCount,Converter={StaticResource BoolToOppositeBoolConverter}}" />
                <MenuItem x:Name ="header3" Header="Verschieben" Command="{Binding ChangeItem}" IsEnabled="{Binding SelectedElementsCount}" />
            </ContextMenu>
        </s:SciChartSurface.ContextMenu>

This still worked, but I have changed the AnnotationsCanvas from the Annotations to AboveChart and the Context Menu doesn’t show if I press the right mouse button:

<s:SciChartSurface.Annotations>

            <!-- Draws Bands behind each axis -->
            <s:BoxAnnotation YAxisId="Ch0" Style="{StaticResource BoxAnnotationStyle0}" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch0}" Y2="{Binding VisibleRange.Max, ElementName=Ch0}" AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:BoxAnnotation YAxisId="Ch1" Style="{StaticResource BoxAnnotationStyle1}" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch1}" Y2="{Binding VisibleRange.Max, ElementName=Ch1}" AnnotationCanvas="AboveChart"   PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:BoxAnnotation YAxisId="Ch2" Style="{StaticResource BoxAnnotationStyle0}" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch2}" Y2="{Binding VisibleRange.Max, ElementName=Ch2}" AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:BoxAnnotation YAxisId="Ch3" Style="{StaticResource BoxAnnotationStyle1}" X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch3}" Y2="{Binding VisibleRange.Max, ElementName=Ch3}" AnnotationCanvas="AboveChart" PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />

            <s:BoxAnnotation YAxisId="Ch1" Name="boxAnnotationCh1" Style="{StaticResource ScichartBoxAnnotationColor_Geometry}" BorderThickness="1" CornerRadius="0"
                             X1="{Binding Coord_CH1.X1,Mode=TwoWay}"  X2="{Binding Coord_CH1.X2,Mode=TwoWay}"  Y1="{Binding Coord_CH1.Y1,Mode=TwoWay}"  Y2="{Binding Coord_CH1.Y2,Mode=TwoWay}"
                             AnnotationCanvas="AboveChart"   PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:BoxAnnotation YAxisId="Ch2" Name="boxAnnotationCh2"  Style="{StaticResource ScichartBoxAnnotationColor_Geometry}" BorderThickness="1" CornerRadius="3"
                             X1="{Binding Coord_CH2.X1}"  X2="{Binding Coord_CH2.X2}"  Y1="{Binding Coord_CH2.Y1}"  Y2="{Binding Coord_CH2.Y2}"
                             PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown"
                             AnnotationCanvas="AboveChart" />
            <s:BoxAnnotation YAxisId="Ch3" Name="boxAnnotationCh3"  Style="{StaticResource ScichartBoxAnnotationColor_Geometry}" BorderThickness="1" CornerRadius="3"
                             X1="{Binding Coord_CH3.X1}"  X2="{Binding Coord_CH3.X2}"  Y1="{Binding Coord_CH3.Y1}"  Y2="{Binding Coord_CH3.Y2}"
                             PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />

            <!-- Draws a Header line into each chart -->
            <s:TextAnnotation Text="{lex:Loc NominalGeometryInput:Resources:AxisDirection}" YAxisId="Ch1"  X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch1}" Y2="{Binding VisibleRange.Max, ElementName=Ch1}" Style="{StaticResource ScichartChartHeaderStyle}"  AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:TextAnnotation Text="{lex:Loc NominalGeometryInput:Resources:AxisSuperelevation}" YAxisId="Ch2"  X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch2}" Y2="{Binding VisibleRange.Max, ElementName=Ch2}" Style="{StaticResource ScichartChartHeaderStyle}"  AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
            <s:TextAnnotation Text="{lex:Loc NominalGeometryInput:Resources:AxisElevation}" YAxisId="Ch3"  X1="0" X2="1" Y1="{Binding VisibleRange.Min, ElementName=Ch3}" Y2="{Binding VisibleRange.Max, ElementName=Ch3}" Style="{StaticResource ScichartChartHeaderStyle}"  AnnotationCanvas="AboveChart"  PreviewMouseMove="BoxAnnotation_PreviewMouseMove" PreviewMouseDown="BoxAnnotation_PreviewMouseDown" />
        </s:SciChartSurface.Annotations>
1 vote
1k views

Dear Andrew,

As mentioned in the previous question. we are getting ready to implement a comprehensive annotation and labeling functionality to our application. Although I know how to add scalable custom-annotations (your team guided us with the implementation in the past), an important part of of annotation functionality is. ability to edit the annotations. But I am having trouble accessing and interacting the the annotations.

How can I access the svg polygon nodes from the custom annotation and drag and move them? I have attched a video to show the existing functionality.

https://youtu.be/AkysJ2R3TyE1

Best,
Pramod

0 votes
6k views

I am showing a dialog window with a ChartSurface in it. I have a context menu option to export to an image, and on window load I export to an XPS file. The dialog works fine if I do not use either feature, but once I do, I intermittently get an exception when showing the dialog. It appears to regularly take 3 instances of the dialog after the export feature is used to throw the exception, and the exception gets thrown twice the first time, threes times the second time, and so on. Again, if I do not use the export feature (no call to ExportToFile), I do not get any exceptions no matter how many times I show the dialog.

The exception message is “The provided DependencyObject is not a context for this Freezable. Parameter name: context”.

There are no other useful details in the exception from what I can see. Its all pretty abstract WPF stuff. The exported file/image seem to be generated accurately regardless of the exception.

I am using SciChart 4.2.2.9724, Visual Studio 2017 Professional, C#, WPF

Any ideas?

2 votes
5k views

After update to SciChart.6.2.1.13304 we get an InvalidOperationException:

    This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
System.InvalidOperationException: This SciChartSurface instance is disposed, you cannot set a RenderSurface on it at this time
   at SciChart.Charting.Visuals.SciChartSurfaceBase.OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
   at SciChart.Charting.Visuals.SciChartSurface.OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.eit(DependencyObject ph, DependencyPropertyChangedEventArgs pi)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetCurrentValue(DependencyProperty dp, Object value)
   at SciChart.Charting.VisualXcceleratorEngine.bov.nmx()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I have no idea what happen. This is how we initalize SciChart:

<s:SciChartSurface x:Name="sciChart"
                           Grid.Column="2"
                           RenderPriority ="Low"
                           s:PerformanceHelper.EnableExtremeDrawingManager="True"
                           s:PerformanceHelper.EnableExtremeResamplers="True"
                           s:VisualXcceleratorEngine.DowngradeWithoutException="True"
                           s:VisualXcceleratorEngine.FallbackType="{x:Type s:HighQualityRenderSurface}"
                           s:VisualXcceleratorEngine.AvoidBlacklistedGpu="False"
                           s:VisualXcceleratorEngine.EnableImpossibleMode="True"
                           s:VisualXcceleratorEngine.IsEnabled="{Binding Path=DirectXSupport, FallbackValue=True}"
                           s:SciChartGroup.VerticalChartGroup="{Binding Path=ChartViewModel.VerticalChartGroupKey}"
                           Style="{StaticResource SciChartSurfaceStyle}"
                           GridLinesPanelStyle="{StaticResource DefaultGridLinesPanelStyle}"
                           RenderableSeries="{s:SeriesBinding RenderableSeriesViewModels, UpdateSourceTrigger=PropertyChanged}">

Any idea?

  • Tobias asked 4 years ago
  • last active 3 years ago
1 vote
5k views

I am working on a proof of concept for our company to move some of our desktop apps to the web. We use SciChart WPF in our desktop apps so we are going with SciChart.JS for the web apps. Is it possible to stack the FastLineRenderableSeries in SciChart.JS like we do in WPF?

Edit: Found the answer just after I posted this question.

sciChartSurface.layoutManager.leftOuterAxesLayoutStrategy = new LeftAlignedOuterVerticallyStackedAxisLayoutStrategy();

Screenshot of WPF Chart

0 votes
9k views

After updating to SciChart 3.1, I started getting the following binding error:

System.Windows.Data Error: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’Abt.Controls.SciChart.Visuals.SciChartSurfaceBase’, AncestorLevel=’1”. BindingExpression:Path=MaxFrameRate; DataItem=null; target element is ‘HighSpeedRenderSurface’ (Name=”); target property is ‘MaxFramerate’ (type ‘Nullable`1’)

I’m not binding MaxFrameRate anywhere nor do I have a HighSpeedRenderSurface explicitly defined in my code, so I’m guessing this error is occurring somewhere in a SciChart control.

I have several SciChartSurface elements across different controls in my application. I tried setting a global style:

<Style TargetType="{x:Type s:SciChartSurfaceBase}">
    <Setter Property="MaxFrameRate" Value="24"/>
</Style>

This had no effect on the binding error.

Any help would be appreciated since I think these errors are affecting the loading speed of my UI.

0 votes
3k views

Hi,

How can we turn the light off and on in 3D drawings in Android studio?

Best regards…

1 vote
1k views

Hi,

I’m trying to render a mountain series with different colors in specific ranges.
I understand that this could be done using the palette provider.

I have done that, but the chart is behaving in a very strange way.

When dividing the chart to 2 color parts, when panning and scrolling it to a point that some of the points are out of window, the coloring starts to go crazy.

I have attached a few images that show the problem, and have also attached a file with the source code.
I have tested this on chrome version 116

Here’s the code

import {FastMountainRenderableSeries, XyDataSeries,ZoomPanModifier,EXyDirection,MouseWheelZoomModifier,NumericAxis,SciChartJSLightTheme, SciChartSurface, parseColorToUIntArgb, DefaultPaletteProvider, EStrokePaletteMode} from 'scichart'

SciChartSurface.UseCommunityLicense();
SciChartSurface.useWasmFromCDN();

class PaletteProvider extends DefaultPaletteProvider {
  constructor() {
    super();
    this.strokePaletteMode = EStrokePaletteMode.SOLID;
  }

  overrideStrokeArgb(xvalue) {    
    return xvalue > 200 ? parseColorToUIntArgb('#ff0000') : undefined
  }

  overrideFillArgb(xvalue) { 
    return xvalue > 200 ? parseColorToUIntArgb('#ff0000') : undefined
  }
}

const init = async () => {
  const {wasmContext, sciChartSurface} = await SciChartSurface.create('container', {theme: new SciChartJSLightTheme()})

  const xAxis = new NumericAxis(wasmContext);
  const yAxis = new NumericAxis(wasmContext);

  sciChartSurface.xAxes.add(xAxis)
  sciChartSurface.yAxes.add(yAxis)

  sciChartSurface.chartModifiers.add(new MouseWheelZoomModifier({xyDirection: EXyDirection.XDirection}))
  sciChartSurface.chartModifiers.add(new ZoomPanModifier({xyDirection: EXyDirection.XDirection}))

  const array = new Array(500).fill(0).map(val => Math.max(Math.random(), 0));
  const array2 = new Array(500).fill(0).map((val, index) => index);

  const dataSeries = new XyDataSeries(wasmContext)
  dataSeries.appendRange(array2, array);

  const series = new FastMountainRenderableSeries(wasmContext, {
    stroke: 'blue',
    fill: 'blue',
    strokeThickness: 3,
    zeroLineY: 0,
    dataSeries,
    paletteProvider: new PaletteProvider()
  })

  sciChartSurface.renderableSeries.add(series);
}

init();

Thanks for the help!

  • haba haba asked 6 months ago
  • last active 6 months ago
0 votes
8k views

I would like to add scroll listener on x axis title. Is it possible to add scroll to axis title

1 vote
5k views

Code changes :
– Grab the SciChart_ScatterChart example

 <s:SciChartSurface Name="sciChart"
                Grid.Column="1"
                Padding="0"
                BorderThickness="0">

 <s:SciChartSurface.RenderableSeries>
     <s:XyScatterRenderableSeries x:Name="scatterRenderSeries0"
                                  Opacity="0.67">
         <s:XyScatterRenderableSeries.PointMarker>
             <s:EllipsePointMarker Width="14"
                                   Height="14"
                                   Fill="{StaticResource PointMarkerFillColor}"
                                   StrokeThickness="0" />
         </s:XyScatterRenderableSeries.PointMarker>
     </s:XyScatterRenderableSeries>
 </s:SciChartSurface.RenderableSeries>

 <s:SciChartSurface.XAxis>
     <s:NumericAxis DrawMajorBands="True"
                    GrowBy="0.1, 0.1"
                    VisibleRangeLimit="0, 0"
                    VisibleRangeLimitMode="Min" />
 </s:SciChartSurface.XAxis>

 <s:SciChartSurface.YAxis>
     <s:NumericAxis DrawMajorBands="True"
                    GrowBy="0.1, 0.1"
                    VisibleRangeLimit="0, 0"
                    VisibleRangeLimitMode="Min" />
 </s:SciChartSurface.YAxis>

 <s:SciChartSurface.ChartModifier>
     <s:ModifierGroup>
         <s:ZoomPanModifier ClipModeX="ClipAtMin" />
         <s:MouseWheelZoomModifier />
     </s:ModifierGroup>
 </s:SciChartSurface.ChartModifier>

Repro steps :

  • Zoom out using the wheel
  • Try to pan
  • Notice that it appears to apply an unwanted zoomToExtents operation

Can I also ask why there is still no ClipModeY for the ZoomPanModifier? there are a few posts relating to this with workarounds, but none of them seem to work as far as I can tell without weird side affects.

  • Ben Green asked 7 months ago
  • last active 7 months ago
1 vote
2k views

Please see attached chart that my users will be seeing.

Y axis range is from 0 to 100. Notice the axis labels, these are all aligned with other major grid lines but for the ones at the top and the bottom.

Please let us know if and how we can fix it.

1 vote
2k views

I tried to use the trial version of SciChart with Next.js. But I got “SciChartSurface.setRuntimeLicenseKey is not a function” error. I don’t know what’s wrong, could you provide guideline for using SciChart with Next.js?

These are the codes in my next.config.js:

const CopyPlugin = require("copy-webpack-plugin");

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  swcMinify: true,
  webpack: ( config, { buildId, dev, isServer, defaultLoaders, nextRuntime, webpack } ) => {
    config.plugins.push(
            new CopyPlugin({
                patterns: [
                    { from: "node_modules/scichart/_wasm/scichart2d.data", to: "" },
                    { from: "node_modules/scichart/_wasm/scichart2d.wasm", to: "" }
                ]
            })
        );
    return config;
  },
}

module.exports = nextConfig

And I have imported these files in pages/index.js

import {SciChartSurface} from "scichart/Charting/Visuals/SciChartSurface";
import {NumericAxis} from "scichart/Charting/Visuals/Axis/NumericAxis";
0 votes
10k views

Hi,
i want to added a Scrollbar by the new version of the Scichart V3.2 for this i want to test the exemple of “Scollbars”

<UserControl.Resources>
    <s:OrientationToVisibilityConverter x:Key="OrientationToVisibilityConverter"/>

    <Style TargetType="s:SciChartScrollbar">
        <Setter Property="GripsThickness" Value="9"/>
        <Setter Property="GripsLength" Value="14"/>
        <Setter Property="ViewportStyle">
            <Setter.Value>
                <Style TargetType="Control">
                    <Setter Property="Background" Value="#49528a"/>
                    <Setter Property="BorderBrush" Value="#6b72a0"/>
                    <Setter Property="BorderThickness" Value="2"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="GripsStyle">
            <Setter.Value>
                <Style TargetType="Control">
                    <Setter Property="Background" Value="#49528a"/>
                    <Setter Property="BorderBrush" Value="#6b72a0"/>
                </Style>
            </Setter.Value>
        </Setter>
    </Style>

</UserControl.Resources>
<Grid s:ThemeManager.Theme="Electric">
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <!--  Create the chart surface  -->
    <s:SciChartSurface Name="sciChart" Grid.Row="0">

        <!--  Declare RenderableSeries and assign to Y-Axis  -->
        <s:SciChartSurface.RenderableSeries>
            <s:FastLineRenderableSeries x:Name="bottomLeftLine" SeriesColor="#c04d4d" StrokeThickness="1" XAxisId="BottomAxisId" YAxisId="LeftAxisId"/>
            <s:FastLineRenderableSeries x:Name="bottomLeftCurve" SeriesColor="#dfa239" StrokeThickness="1" XAxisId="BottomAxisId" YAxisId="LeftAxisId"/>
            <s:FastLineRenderableSeries x:Name="topRightLine" SeriesColor="#FFB3E8F6" StrokeThickness="1" XAxisId="TopAxisId" YAxisId="RightAxisId"/>
            <s:FastLineRenderableSeries x:Name="topRightCurve" SeriesColor="#6495ed" StrokeThickness="1" XAxisId="TopAxisId" YAxisId="RightAxisId"/>
        </s:SciChartSurface.RenderableSeries>

        <!--  Create an X Axis  -->
        <s:SciChartSurface.XAxes>
            <s:DateTimeAxis x:Name="BottomAxis" AxisAlignment="Bottom" AxisTitle="Bottom Axis" BorderBrush="#FFE26565" BorderThickness="0,1,0,0" Id="BottomAxisId" TickTextBrush="#FFE26565"/>
            <s:DateTimeAxis AxisAlignment="Top" AxisTitle="Top Axis" BorderThickness="0,0,0,1" Id="TopAxisId">
                <s:DateTimeAxis.Scrollbar>
                    <s:SciChartScrollbar Height="16"/>
                </s:DateTimeAxis.Scrollbar>
            </s:DateTimeAxis>
        </s:SciChartSurface.XAxes>

        <!--  Create Y Axes on the Left and Right. Optional bands give a cool look and feel for minimal performance impact  -->
        <s:SciChartSurface.YAxes>
            <s:NumericAxis AxisAlignment="Left" AxisTitle="Left Axis" BorderBrush="#FFE26565" BorderThickness="0,0,1,0" DrawMajorBands="True" GrowBy="0.05, 0.05" Id="LeftAxisId" TextFormatting="#.0" TickTextBrush="#FFE26565">
                <s:NumericAxis.Scrollbar>
                    <s:SciChartScrollbar Width="16"/>
                </s:NumericAxis.Scrollbar>
            </s:NumericAxis>
            <s:NumericAxis AxisAlignment="Right" AxisTitle="Right Axis" BorderThickness="1,0,0,0" GrowBy="0.05, 0.05" Id="RightAxisId" TextFormatting="#.0">
                <s:NumericAxis.Scrollbar>
                    <s:SciChartScrollbar Width="16"/>
                </s:NumericAxis.Scrollbar>
            </s:NumericAxis>
        </s:SciChartSurface.YAxes>

        <!--  Create chart modifiers to zoom, pan and double click to zoom extents  -->
        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:RubberBandXyZoomModifier IsXAxisOnly="True"/>
                <s:ZoomPanModifier ExecuteOn="MouseRightButton"/>
                <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
                <s:LegendModifier Margin="10" GetLegendDataFor="AllSeries" ShowLegend="True"/>
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>
    </s:SciChartSurface>
    <Grid Grid.Row="1" Background="#FF151624">
        <s:SciChartScrollbar Height="16" Margin="6,5,4,5" Axis="{Binding ElementName=BottomAxis}"/>
    </Grid>
</Grid>

using System;
using System.Windows;
using System.Windows.Controls;
using Abt.Controls.SciChart.Model.DataSeries;

namespace Abt.Controls.SciChart.Example.Examples.IWantTo.ZoomAndPanAChart
{
///

/// Interaction logic for ScrollBars.xaml
///

public partial class ScrollBars : UserControl
{
// Used to generate Random Walk
private Random _random = new Random(251916);
const int Count = 2000;

    public ScrollBars()
    {
        InitializeComponent();
    }

    private void ScrollBarsLoaded(object sender, RoutedEventArgs e)
    {
        // Batch updates with one redraw
        using (sciChart.SuspendUpdates())
        {
            // Add four data-series
            var dataSeries0 = new XyDataSeries<DateTime, double>();
            var dataSeries1 = new XyDataSeries<DateTime, double>();
            var dataSeries2 = new XyDataSeries<DateTime, double>();
            var dataSeries3 = new XyDataSeries<DateTime, double>();

            // Fill each dataset with 2,000 pts of X,Y values (Date,Double)
            // and ensure RenderableSeries has its datasource
            bottomLeftLine.DataSeries = FillData(dataSeries0, "Line #1");
            bottomLeftCurve.DataSeries = FillData(dataSeries1, "Curve #1");
            topRightLine.DataSeries = FillData(dataSeries2, "Line #2");
            topRightCurve.DataSeries = FillData(dataSeries3, "Curve #2");

            // Set Visible ranges to force scrollBars
            sciChart.YAxes[0].VisibleRange = new DoubleRange(12, 28);
            sciChart.YAxes[1].VisibleRange = new DoubleRange(-2, 8);
            sciChart.XAxes[0].VisibleRange = new DateRange(new DateTime(2012, 1, 5), new DateTime(2012, 1, 10));
            sciChart.XAxes[1].VisibleRange = new DateRange(new DateTime(2012, 1, 5), new DateTime(2012, 1, 10));
        }
    }

    private IDataSeries FillData(IXyDataSeries<DateTime, double> dataSeries, string name)
    {
        double randomWalk = 10.0;
        var startDate = new DateTime(2012, 01, 01);

        // Generate the X,Y data with sequential dates on the X-Axis and slightly positively biased random walk on the Y-Axis
        var xBuffer = new DateTime[Count];
        var yBuffer = new double[Count];
        for (int i = 0; i < Count; i++)
        {
            randomWalk += (_random.NextDouble() - 0.498);
            yBuffer[i] = randomWalk;
            xBuffer[i] = startDate.AddMinutes(i * 10);
        }

        // Buffer above and append all in one go to avoid multiple recalculations of series range
        dataSeries.Append(xBuffer, yBuffer);
        dataSeries.SeriesName = name;

        return dataSeries;
    }
}

}

i added the reference “Abt.controls.SciChart.wpf” but always i have the error in the DateTimeAxis.Scrollbar and <s:NumericAxis.Scrollbar> , i think that missing an assembly reference of the scrollbar but i don’t know what’s this assembly (like the errors in the picture)??? thank you !

  • sahar Les asked 9 years ago
  • last active 9 years ago
1 vote
2k views

I have a chart with a box annotation. When I try to resize the box annotation by dragging the left or right border, I got the “Uncaught TypeError: Cannot read properties of undefined (reading ‘x’)”. It’s not always reproducible and cannot be reproduced by dragging the whole box. Also, it only occurs with SciChart version 3 but not SciChart version 2. Please check the screenshots for more details.

  • Quyen Sy asked 1 year ago
  • last active 12 months ago
1 vote
975 views

stack overflow link : https://stackoverflow.com/questions/77781766/reactjs-sweep-line-optimizing-scichartjs-performance-reusing-wasmcontext-for-m

I have a performance problem with scichartjs, when initializing about 40 charts/surfaces the rendering state drops to 5-10 frames per second.

I think it might be related to the fact that I run the create function each time and not reusing the wasmContext maybe?
but I am not sure how to reuse the wasmContext or what is the best performance for this kind of type

demo : https://9669tv.csb.app/

enter image description here
(sorry for the low quality of the Giff due to 2 MB max size of upload)

this is my init function

export const initScichart = async (divElementId) => {
  SciChartSurface.UseCommunityLicense();
  //console.log(divElementId.id);
  const { sciChartSurface, wasmContext } = await SciChartSurface.create(
    divElementId,
    {
      theme: new SciChartJsNavyTheme(),
    }
  );

  sciChartSurface.xAxes.add(
    new NumericAxis(wasmContext, {
      visibleRange: new NumberRange(0, 5),
    })
  );
  sciChartSurface.yAxes.add(
    new NumericAxis(wasmContext, {
      autoRange: EAutoRange.Always,
    })
  );

  const xyDataSeries = new XyDataSeries(wasmContext, {
    fifoCapacity: 220_000, // set fifoCapacity. Requires scichart.js v3.2 or later
    fifoSweeping: true,
    fifoSweepingGap: 2_200,
    containsNaN: false,
    isSorted: true,
  });

  sciChartSurface.renderableSeries.add(
    new FastLineRenderableSeries(wasmContext, {
      dataSeries: xyDataSeries,
      strokeThickness: 1,
      stroke: "#50C7E0",
    })
  );

  xyDataSeries.sciChartSurfaceToDelete = sciChartSurface;

  return xyDataSeries;
};

enter image description here

the reason I need the charts on different surfaces is that I need to wrap them in SortableJS (to be able to drag them across the website)

0 votes
5k views

Hello Team,

We are going through the Trial version of Sci Chart and we are specifically interested in 2D Scatter Chart and Simple Scatter Chart 3D.

For 2D Chart we tried to bind up-to 1 Million data points and it worked perfectly and we can zoom in 2D Scatter Chart to view each and every point.

When we tried the same for Simple Scatter Chart 3D, it was competitively slower than 2D Chart.

can we do the same in Simple Scatter Chart 3D?

Currently the whole chart is zooming in. Is there a way so that user can zoom in (XAxis , YAxis ,ZAxis ) individually so that each and every point in the chart can be View-able ?

Thanks,

0 votes
3k views

I downloaded your SciChart trial version. The download placed all you assemblies into:

C:\Program Files (x86)\SciChart\SciChart SDK\Lib\net452

and duplicated the assemblies into:

C:\Program Files (x86)\SciChart\SciChart SDK\Lib\netcoreapp3.0.

Then I download the SciChart examples from GitHub directly into Visual Studio and it created a repository at

C:\Users\Dell\source\repos\SciChart.Wpf.Examples\Examples

Then I tried to compile but the dependencies were not resolved in the project SciChart.Exmaples.ExternalDependencies. I get yellow warning signs next to all your SciChart assemblies (e.g. SciChart.DirectX). Please advise.

1 vote
4k views

Hello,

I recently updated 2 different apps that both use SciChart with XCode14 and uploaded the archives to the App Store via Organizer. They both generated the warning/error:

“The app references non-public selectors in …/Frameworks/SciChart.framework/SciChart: moveToX:y:”

This did not occur with Xcode 13.

Any advice on how best to handle this?

Thank you.

  • C Bolton asked 1 year ago
  • last active 11 months ago
1 vote
9k views

Hi there,

Following your example “Change Render Series Type” I’d like to know if there is a straightforward way of extending it to include the XyScatterRenderSeries? I’d like to be able to have relatively the same styled appearance when selected and toggled between a FastLineRenderableSeries and an XyScatterRenderableSeries but am uncertain of how this would be accomplished. I apologize in advance if the answer is obvious, I’m quite new to this whole WPF, C#, MVVM thing and any help would be appreciated.

Matt

  • Matt Brown asked 9 years ago
  • last active 9 years ago
Showing 1 - 50 of 4k results