Pre loader

1

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

0 votes

Hi Quan,

I’m assuming your data has X-values 1,3, 4, 6, 8, 12, 13, 15 right?

If so, this is expected behaviour for a Value-axis, which uses the X-Value to space data-points. Please see What is a Value Axis vs. a Category Axis?.

What you need is a CategoryAxis. Right now SciChart supports only CategoryDateTimeAxis, but we are developing now a CategoryNumericAxis which will solve this problem and be available in v4.1 of SciChart.

Until then, you can give your data X-values that are sequential e.g. 1,2,3,4,5,6 … and it will space data correctly.

Best regards,
Andrew

1 vote

I found solution:

 var dataseries = this.ParentSurface.RenderableSeries[0].DataSeries;
        var index = dataseries.FindIndex(MainAnnotation.X1, SciChart.Charting.Common.Extensions.SearchMode.Nearest);
        var yValue = (IComparable)this.ParentSurface.RenderableSeries[0].DataSeries.YValues[index];
0 votes

I updated from SciChart 3.4.3.7019 to 3.6.1.7977 which fixed the problem that series were drawn in white when the PaletteProvider returned Colors.Transparent.

0 votes

Hi Jean Philippe.

A simple calculation to determine the memory requirement of SciChart is as follows.

40,000,000 points of X=Double, Y=Double requires 40,000,000 * 2 * 8 bytes just to store the data values. This is 640MBytes.

In addition, scichart needs some memory to store drawing commands and pixel coordinates (but not much).

Adding Metadata to X,Y points requires a further 4 bytes per data-point = 800MByte. Metadata is not added unless you add it, however for FIFO charts we have to create an empty Metadata array anyway. So it is possible to have 800MByte memory requirement for 40M points.

This is the raw amount of memory required to just store the data.

The limit per-process for 32-bit applications is 1.5GByte of memory and less if the heap is fragmented. So it is easy to get out of memory exception in 32-bit mode with this many data points.

What you can do is change the data-types.

  1. Don’t use FIFO and don’t use metadata as this will discard the 4 bytes per data-point required for the metadata.
  2. Use XType or YType int, float to reduce memory requirements.

e.g. 40M points, non FIFO, X,Y types float will require just 320MByte. A considerable reduction.

Alternatively, force your application to run in 64-bit mode when you have such high data requirements and everything will be OK!

Best regards,
Andrew

0 votes

Thanks Andrew… I eliminated binding and range as the issue I think…

If I set AutoRange to Auto all is fine but not what I want, if I set AutoRange to Once – I have lines but then my binding will not update range properly. If I set it to Never binding works as expected but no Horizontal Lines… I’m not making any other code changes here just changing the AutoRange property.

I worked around this by manually drawing the lines from code and leaving AutoRange set to never.

If I ever figure it out I’ll post back.

0 votes

Hi there,

DataSeries use these values internally to calculate Max and Min. For instance, if you have DataSeries<double, double> then YMax is set to Double.MinValue. This is so when the dataseries calculates YMax = Math.Max(YMax, y) it will always take Y after the first data-point is added.

May I ask, does it cause any specific problems? If so please treat DateTime.MinValue/MaxValue as ‘invalid values’.

Kind regards,
Andrew

0 votes

Hey Chris,

I’m glad you figured it out, however this is also a feature native to SciChart.

See usage of Annotation.CoordinateMode = CoordinateMode.Relative.

In this mode, the X1,Y1 coordinates are from 0.0 to 1.0 where 0.0 is the left (or bottom) edge of the chart, and 1.0 is the right (or top) edge of the chart.

Furthermore, TextAnnotation can be anchored to the left / top (controlling where the X,Y coordinate operates from) using the HorizontalAnchorPoint and VerticalAnchorPoint properties.

Best regards,
Andrew

1 vote

Hi Andrew,

Thanks for the quick reply!

I did try using your example, and I must admit that the fault was mine. I had left out the SuspendUpdates call (because I was using databinding).
But after I introduced it , performance is absolutely perfect.

Thanks!

0 votes

Hi Robert,

Thanks for your question.

The DragStarted, DragEnded, DragDelta events occur when an Annotation is being dragged by a user.

You can also subscribe to Thumb.DragStarted, DragDelta, DragCompleted events. These will signal the resize action when a user is resizing using the Resize Grips.

You can also create a new feature request if you wish specific resize events to be added and let people vote for this. Here is how to do it:
https://www.youtube.com/watch?v=cWa6bRCCAFE

Hope this helps.

1 vote

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

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

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

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

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

0 votes

Hi Egor,

Unfortunately it is not possible at the moment to use Palette Provider with FastMountainRenderableSeries. This may change in future releases.

Please check the page Change Series Color Dynamically using PaletteProvider as this has detailed info on how to use the PaletteProvider, and what series types are supported.

Kind regards,
Andrew

0 votes

Update: we just noticed a bug(?) / issue where by the DateTimeNumericAxis won’t calculate deltas lower than 1 second.

This means that for resolutions below a second in SciChart.js you don’t get axis labels.

To fix this, in our Codepen we previously provided, we added a hint to suggest meaningful deltas that the axis can calculate. This is done as follows using the possibleDeltas property of an axis.

  const xAxis = new DateTimeNumericAxis(wasmContext, {
    axisTitle: "X Axis / DateTime",
    // Need to pass in smaller possible Deltas to allow for millisecond ticks
    possibleDeltas: [
        0.001,
        0.002,
        0.005,
        0.01,
        0.02,
        0.05,
        0.1,
        0.2,
        0.5,
        1,
        2,
        5,
        10,
        15,
        30,
        60,],
    labelProvider: new DynamicDateLabelProvider(),
  });

With that you can now zoom into milliseconds using SciChart.js and unix time stamps. Here’s a quick gif showing the zoom resolution down to milliseconds.

enter image description here

We’re going to address this in future releases, but for now, use possibleDeltas to extend precision of the date axis.

Best regards,
Andrew

1 vote

Hi Fabio

Pretty much. The libraries are designed to be as similar as possible, but because they are written in different languages (at different times) there will be some features implemented in one library (WPF) and not on another (JS)

However, for the code features they are almost identical.

XY charts in wpf and JS support line, scatter, column, mountain, stacked column/mountain, band, candlestick, ohlc, Heatmap. Both support pie and donut. All support unlimited multiple X Y axis on left, right, bottom or top of the chart. All support themes and have customisable themes so they look very similar. They support tooltips, legends, zooming and panning. The APIs are very similar (same properties names but wpf will have Xaml binding where JS will have programmatic properties)

My suggestion is try working with a core subset of the libraries on both platforms. If you notice any differences, tell us, we would like to hear it

Best regards
Andrew

0 votes

Thank you for your answer.

Let me ask the question in a different way.

Is it possible to use RolloverModifier to show the cursor position in your sample app(WPF Chart Interaction with Annotations)?

If you use RolloverModifier, can you grab the annotation to move?

I want to know the way to use both showing the cursor position and grabing annotations in one mode.

0 votes
        <s:SciChartSurface.RenderableSeries>
            <s:FastLineRenderableSeries DataSeries="{Binding ChartData}"
                                        IsDigitalLine="{Binding IsDigitalLine,
                                                                Mode=TwoWay}"
                                        ResamplingMode="{Binding SeriesResamplingMode}"
                                        Style="{StaticResource LineSeriesStyle}"
                                        s:CursorModifier.SnapToSeries="True"
                                        s:RolloverModifier.TooltipContainerStyle="{StaticResource TooltipStyle}"
                                        s:RolloverModifier.TooltipTemplate="{StaticResource TooltipDataTemplate}" />
        </s:SciChartSurface.RenderableSeries>

Here is the example I got from the SDK, but there is no example about how to do it in a MVVM pattern project.

1 vote

Weird squares (its asked a lot) are the Axis Bands which shows you which parts are which

enter image description here

Please have a look at the article Styling and Theming iOS Chart Parts

// Style the XAxis Bands (fill between axis gridlines)
xAxis.style.gridBandBrush = SCISolidBrushStyle(colorCode: 0x55ff6655)

Also you can set whether the bands draw or not with this code

yAxis.style.drawAxisBands = false

Best regards,
Andrew

0 votes

Hi there,

Thanks for your question.
Unfortunately, the behaviour you are looking for is not supported by SciChart out of the box.
Our heatmap dataseries metadata has a different format, so the behaviour of selecting data points from its metadata is a bit complicated, and it is not implemented in the current version.

You may submit this as a feature request. To see how to submit a feature request and how are they prioritized, please read here:
https://www.scichart.com/feedback-policy/

0 votes

Thank you for your reply.

And getting the code of SciChart.Examples.ExternalDependencies from GitHub and customizing the OnCreateModifiers section.

Before:

        foreach (var exampleMod in exampleModifiers.ChildModifiers.Where(x => GetAppearceInToolbar((ChartModifierBase)x)))
        {
            if (HasToAddUserModifierToModifierGroup(exampleMod, devMods))
            {
                devMods.ChildModifiers.Add(exampleMod);
            }

            if (HasToAddUserModifierToModifierGroup(exampleMod, userMods))
            {
                userMods.ChildModifiers.Add(exampleMod);
            }
        }

After:

        foreach (var exampleMod in exampleModifiers.ChildModifiers.Where(x => GetAppearceInToolbar((ChartModifierBase)x)).Where(a => HasToAddUserModifierToModifierGroup(a, devMods)).ToList())
        {
            devMods.ChildModifiers.Add(exampleMod);
        }
        foreach (var exampleMod in exampleModifiers.ChildModifiers.Where(x => GetAppearceInToolbar((ChartModifierBase)x)).Where(a => HasToAddUserModifierToModifierGroup(a, userMods)).ToList())
        {
            userMods.ChildModifiers.Add(exampleMod);
        }
1 vote

Thank you, I was trying to recreate the market profile renderable series on JS. Was wondering if it should be a custom annotation where users can drag across a bunch of bars and then we calc/render the profile. or it could be a custom series by itself extended from the base renderable series?

https://www.scichart.com/documentation/win/current/webframe.html#The%20Market%20Profile%20RenderableSeries.html

0 votes
In reply to: How to print a chart?

UPDATED

Hi there,

We have several articles on printing and exporting to bitmap or XPS/PDF etc…

Please see:

The Screenshots, XPS Printing, X-Axis Text Labels article now has an updated sample which compiles against SciChart v3.0 so you can download it and get started.

Hope this helps!
Yuriy

Showing 41 - 60 of 6k results