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

0 votes
3k views

Hello,

I have a Blazor WASM app running Scichart JS. In attempting to get any of the filters working listed in the Filters API docs I am unable to build my application and get thrown an error.

As listed in Moving Average Filter Docs I import the XyMovingAverageFilter:

import { XyMovingAverageFilter } from ‘scichart/Charting/Model/Filters/XyMovingAverageFilter’;

Run npm install and build the application and I get the error:
Module not found: Error: Can’t resolve ‘scichart/Charting/Model/Filters/XyMovingAverageFilter’ in …

So far I have not run into any issues getting any of the Scichart JS APIs working in this manner.

  • Leland asked 2 years ago
  • last active 2 years ago
0 votes
14k views

Hi guys,

I purchased sci chart recently and have been using it in our trading applications. We have a requirement to produce some reports around our activity that are not numeric or date time on the x-axis.

I assumed sci chart would be able to handle text on an axis but it seems that it cant. Is there any work around to this?!

We really do not want to have to buy another charting package just to produce some simple charts and we love sci chart for everything else…

1 vote
3k views

Hello I have been having a difficult time getting the correct time displayed on my xAxis and labels.

Passing in an xValue to an OHLC data series of 60 and the setting cursorLabelFormat: ENumericFormat.Date_DDMMHHMM this should produce a label “01/01 00:01” With the year as 1970.

When the computers timezone is set to UTC + 0 this behaves as expected.

However when the computers timezone is set to anything negative (UTC – 7) the label is formatted as “31/12 00:01” with the year 1969. If scichart is trying to convert to local time I would expect a reading of “31/12 17:01” 1969.

And when the timezone is set to anything positive (UTC + 7) the label is formatted as it is UTC +0 “01/01 00:01” 1970 again I would expect the hour to corrispond to the UTC offset if scichart is trying to convert to local time.

Looking at the later case I would assume that no time conversion is taking place which is what I would prefer. But looking at the former case (UTC -X) there appears to be some manipulation happening somewhere, I just have not been able to find any documentation explaining this. Am I missing something to get this to work properly out of the box without a custom label provider?

Thank you,

Update:

I do not want to worry about timezones. I want sciChart to plot the time that I give it. Again this is acting as expected when the computer timezone is in anything greater than UTC 0. But when the computer timezone is less than UTC 0 the label and axes are showing a date 24 hours prior to what I give it.

See attached images for the error. Note the only change that is happening is changing the computer timezone from UTC – 4 to UTC + 4.

See below for code setting up the chart.

Why is changing the computer timezone affecting the data labels?

export async function example(element) {
    let { sciChartSurface, wasmContext } = chartInstances.hasOwnProperty(element.id) && chartInstances[element.id];

    // initialize sciChart and add created chart to chartInstances
    if (sciChartSurface === undefined) {
        const newContext = await SciChartSurface.create(element.id);
        sciChartSurface = newContext.sciChartSurface;
        wasmContext = newContext.wasmContext;
        chartInstances[element.id] = { sciChartSurface, wasmContext };
    }

    //create and add xAxis
    let xAxis = new CategoryAxis(wasmContext, {
        drawLabels: true,
        drawMajorTickLines: true,
        drawMinorTickLines: true,
        axisAlignment: EAxisAlignment.Bottom,
        autoRange: EAutoRange.Once,
        cursorLabelFormat: ENumericFormat.Date_DDMMHHMM,
        labelFormat: ENumericFormat.Date_DDMMYYYY,
    });

    sciChartSurface.xAxes.add(xAxis);

    //create and add yAxis
    let yAxis = new NumericAxis(wasmContext, {
        maxAutoTicks: 5,
        autoRange: EAutoRange.Always,
        growBy: new NumberRange(0.3, 0.11),
        axisAlignment: EAxisAlignment.Right,
        labelPrecision: 4
    });
    sciChartSurface.yAxes.add(yAxis);

    //add chart modifiers
    sciChartSurface.chartModifiers.add(new ZoomPanModifier({ xyDirection: EXyDirection.XDirection }));
    sciChartSurface.chartModifiers.add(new ZoomExtentsModifier({ xyDirection: EXyDirection.XDirection }));
    sciChartSurface.chartModifiers.add(new MouseWheelZoomModifier({ xyDirection: EXyDirection.XDirection }));
    sciChartSurface.chartModifiers.add(new RolloverModifier({ modifierGroup: "first", showTooltip: false }));
    sciChartSurface.chartModifiers.add(new CursorModifier(
        {
            crosshairStroke: "#9598a1",
            crosshairStrokeDashArray: [10, 5],
        }));

    //apply desired theme
    sciChartSurface.applyTheme(new SciChartJSDarkTheme());

    //create three bars 
    _ohlcDataSeries = new OhlcDataSeries(wasmContext, {
        xValues: [60,120,180], //1 min, 2 min, 3 min post epoch
        openValues: [10,10,10],
        highValues: [15,15,15],
        lowValues: [5,5,5],
        closeValues: [11,11,11],
        dataSeriesName: "PriceDataSeries"
    });

    //create and style fastCandRendSeries
    const fcRendSeries = new FastCandlestickRenderableSeries(wasmContext,
        {
            dataSeries: _ohlcDataSeries,
            strokeThickness: 1,
            dataPointWidth: 0.5,
            brushUp: "#50ff50B2",
            brushDown: "#ff5050B2",
            strokeUp: "#50ff50",
            strokeDown: "#ff5050",
            animation: new WaveAnimation({ fadeEffect: true, duration: 800 })
        });
    sciChartSurface.renderableSeries.add(fcRendSeries);
}
  • Leland asked 2 years ago
  • last active 2 years ago
1 vote
8k views

I found the example for spline drawing, but it’s still missing the gradient brush that mountain series have, how can I add it? thanks

0 votes
0 answers
3k views

Hi,

I begin with Scichart, I am coding with binding program and I need to make Selection Point Markers. I can see the point Markers but when I activate the SelectedPointMarker then it doesn’t work. I want to ask how to adapt the exemple with a binding program, what to write in the “.cs”. I am sending you the wpf code and the interface. Can you help me please?

Thank you verry much.

0 votes
14k views

I have a ViewModel class with three controls, two text boxes and a checkbox. The two text boxes are supposed to control minimum and maximum of the chart, and the autoscale should set the AutoRange of the chart.

I’ve got my XAML like this

<sc:SciChartSurface.YAxis>
<sc:NumericAxis AxisTitle="PSD" MaxAutoTicks="5" DrawMinorGridLines="False" AutoRange="{Binding AutoScale}" VisibleRange="{Binding YVisibleRange}">
</sc:NumericAxis>
</sc:SciChartSurface.YAxis>

and in my viewmodel, I have:

    public int Maximum
    {
        get { return _maximum; }
        set
        {
            _maximum = value;
            NotifyOfPropertyChange(() =&gt; Maximum);
            YVisibleRange.Max = _maximum;
        }
    }


    public int Minimum
    {
        get { return _minimum; }
        set
        {
            _minimum = value;
            NotifyOfPropertyChange(() =&gt; Minimum);
            YVisibleRange.Min = _minimum;
        }
    }

    public DoubleRange YVisibleRange
    {
        get { return _visibleRange; }
        set
        {
            _visibleRange = value;
            NotifyOfPropertyChange(() =&gt; YVisibleRange);
        }
    }


    public void ToggleAutoScale()
    {
        AutoScale = !AutoScale;
    }

    public bool AutoScale
    {
        get { return _autoScale; }
        set
        {
            _autoScale = value;
            NotifyOfPropertyChange(() =&gt; AutoScale);
        }
    }

The auto scale functionality always works. However, only when I have not used auto scale at all, does the minimum maximum stuff work.

I would like for auto scale to completely control the graph when it’s on, and when it’s off, minimum/maximum should control the range of the graph. How do I achieve this?

0 votes
0 answers
2k views

We are using a sci-chart in our ReactJs project.

SCI chart values have to be changed from the sidebar and whenever a value is changed from the sidebar the chart values are not updated without re-rendering the entire surface of the SCI chart. We need to change the sidebar value without re-rendering how is this possible?

0 votes
7k views

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

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

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

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

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

0 votes
136 views

In a scenario where two numeric axis (X, Y) both have IsCenterAxis set to true, is it then possible to force MouseWheelZoomModifier to use center point of current view when zooming, rather than using mouse point as center point when zooming ?

0 votes
4k views

Here my code, i try to draw a chart with candle stick and horizontal line with real time data update, but HorizontalLineAnnotation never show, here my code:
final CategoryDateAxis xAxis = sciChartBuilder.newCategoryDateAxis()
.withGrowBy(0, 0.01)
.withVisibleRange(80, 102)
.build();
NumericAxis yAxis = sciChartBuilder.newNumericAxis()
.withAxisId(PRICES)
.withTextFormatting(“0.00”)
.withAutoRangeMode(AutoRange.Always)
.build();

    Collections.addAll(surface.getXAxes(), xAxis);
    Collections.addAll(surface.getYAxes(), yAxis);

               FastCandlestickRenderableSeries rSeries =  sciChartBuilder.newCandlestickSeries().withDataSeries(stockPrices).withYAxisId(PRICES)
                       .build();

                HorizontalLineAnnotation horizontalLine = sciChartBuilder.newHorizontalLineAnnotation()
                        .withPosition(5d, 3.2d) // i have try to change this but wont work
                        .withStroke(2, ColorUtil.Orange)
                        .withHorizontalGravity(Gravity.RIGHT)
                        .withIsEditable(true)
                        .build();
    ohlcAxisMarker = sciChartBuilder.newAxisMarkerAnnotation().withY1(1d).withBackgroundColor(0xFF33DD33).withYAxisId(PRICES).build();

                UpdateSuspender.using(surface, new Runnable() {
                    @Override
                    public void run() {
                        Collections.addAll(surface.getAnnotations(), ohlcAxisMarker, horizontalLine);
                        Collections.addAll(surface.getRenderableSeries(), rSeries);
                        Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newModifierGroupWithDefaultModifiers().build());
                    }
                });
  • tran hai asked 4 years ago
  • last active 4 years ago
1 vote
2k views

Hello,

I have several simple SciChartSurfaces in my WPF-grid. They are in the same WPF-column but in different WPF-rows, so they are arranged in a vertical manner.

I have noticed that the Y-Axis (a NumericAxis-objcet) moves automatically slightly to the left to make room for the numbers on the Y-Axis, if necessary.

I would like to ask if there is a way to “synchronize” the position of several similar Charts (or their Y-Axis´s, respectively.), so the different Y-Axis´s would always be in the same position. Ideally, the Y-Axis´s of all the Charts would move as far to the left as necessary to make room for the longest number of all the Axis´s.

I have attached an example of my current situation and the solution I would ideally like to achieve.

Is there any way to “connect” the different Axis of the charts to create the desired result?

Thank you.

1 vote
7k views

To whom this may concern:

I am having an issue setting the axis alignment with your 2D Heatmap series. I have tested this with your “Heatmap Chart” sample from your Examples Suite.

Lines 44-50 are shown below from your “HeatMapExampleView” XAML file. I have added the AxisAlignment parameters as shown.

<s:SciChartSurface.XAxis>
    <s:NumericAxis AxisAlignment="Left" DrawMajorBands="True" />
</s:SciChartSurface.XAxis>

<s:SciChartSurface.YAxis>
    <s:NumericAxis AxisAlignment="Top" DrawMajorBands="True" />
</s:SciChartSurface.YAxis>

Note how the Y-Axis is aligned to a vertical parameter (Top, in this case) and X-Axis is aligned to a horizontal parameter (Left). This leads to scichart not showing any heatmap at all, as shown in the attached images.

It will work if i set Y to Left or Right, and X to Top or Bottom, but not the other way around.

Can you please advise?

Thanks kindly!

  • Ari Sagiv asked 8 years ago
  • last active 8 years ago
0 votes
2k views

Corresponding Order ID: ABTSOFT-2145

We’ve bought one license for our company and some ex-coworkers have activate the license in the same computer[hardware] but with different Windows operating systems for testing.

Now those Windows systems have been covered by a new one. The problem is: we have not deactivate scichart used in the old windows systems. Now we cannot activate scichart in the current used windows system. Could anyone help to reset the activation status of our license?

https://drive.google.com/file/d/1fRXATnHhb4aGFQeQAqXN5cHnr0UQKt7Y/view?usp=sharing

  • Niu mag asked 2 years ago
  • last active 2 years ago
1 vote
9k views

We are using the VerticalLineAnnotation and want to change it’s location (X1 property) in the viewmodel.

Annotations are bound like this:

<s:SciChartSurface
           ...
           Annotations="{s:AnnotationsBinding Annotations}"

to the property:

public ObservableCollection<IAnnotationViewModel> Annotations { get; private set; }

The collection contains this association:

this.nowAnnotation = new VerticalLineAnnotationViewModelEx()
        {
            X1 = TimeSpan.FromSeconds(0),
            StyleKey = "NowAnnotationStyle"
        };

To change the location we change the value of X1:

nowAnnotation.X1 = value;

Calling that didn’t have a direct effect on the UI unless the user does any action which redraws the chart.

We created a style which sets an attached property to pass the VerticalLineAnnotation to the view model, this works fine.

<Style TargetType="s:VerticalLineAnnotation" x:Key="NowAnnotationStyle">
                    <Setter Property="viewModels:VerticalLineAnnotationViewModelEx.PassIAnnotation" Value="True" />
                </Style>

And we added a Refresh method to VerticalLineAnnotationViewModelEx and call it after setting X1:

nowAnnotation.X1 = value;
nowAnnotation.Refresh();

The first implementation of the Refresh method we did was:

public void Refresh()
    {
        this.Annotation.Refresh();
    }

From the documentation this should redraw the annotation without redrawing the whole chart, but it had no effect.
https://www.scichart.com/documentation/win/current/webframe.html#SciChart.Charting~SciChart.Charting.Visuals.Annotations.AnnotationBase~Refresh.html

It only started working after changing to this:

public void Refresh()
    {
        this.Annotation.ParentSurface.InvalidateElement();
    }

Is there a better way to do it, shouldn’t the first implementation work?

The complete code of VerticalLineAnnotationViewModelEx

public class VerticalLineAnnotationViewModelEx : VerticalLineAnnotationViewModel
{
    public static readonly DependencyProperty PassIAnnotationProperty = DependencyProperty.RegisterAttached(
        "PassIAnnotation", typeof(bool), typeof(VerticalLineAnnotationViewModelEx),
        new PropertyMetadata(default(bool), OnPassIAnnotationChanged));

    public IAnnotation Annotation { get; private set; }

    private static void OnPassIAnnotationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        var verticalLineAnnotation = (VerticalLineAnnotation)d;
        ((VerticalLineAnnotationViewModelEx)verticalLineAnnotation.DataContext).Annotation = (IAnnotation)d;
    }

    public static void SetPassIAnnotation(DependencyObject element, bool value)
    {
        element.SetValue(PassIAnnotationProperty, value);
    }

    public static bool GetPassIAnnotation(DependencyObject element)
    {
        return (bool)element.GetValue(PassIAnnotationProperty);
    }

    public void Refresh()
    {
        //this.Annotation?.Refresh();
        this.Annotation?.ParentSurface.InvalidateElement();
    }
}
1 vote
0 answers
8k views

Hi,

I’m evaluating SciChart. Our app requires that series and axes be dynamically added to the chart. So, I kind of followed the “Create Stock Charts Realtime Ticking Stock Charts” example to use the SeriesSource. The Append() method is used to add a data point in a worker thread. The total number of data point is just 10 and each data point arrives at about every second.

I saw that the line was not drawn until the last data point was added. The line chart was exactly what I expected. So, everything (SeriesSouce, axes, series, renderable series, bindings) seems to be working except that the line was not drawn real time. I added ViewportManager.InvalidateElement() right after the Append() method. But, the result was the same. I didn’t do anything special when the last data point arrived. So, I’m not sure why SciChart was able to show the line chart at the end.

Am I missing anything here?

Best Regards,

1 vote
2k views

The scichart y axis is displayed as undefined after updating the data in timed interval. The y axis initially shows the value,but after the data is appended to the source, the y axis is shown as undefined in the chart.

I have attached the final scichart image with yaxis as undefined.

0 votes
19k views

Someone recently asked the question on priority support tickets

Q: How do I have two YAxis on the left and right of the chart but with
the same VisibleRange?

e.g. how to mirror the YAxis on both sides of the chart

We are replicating the answer below for benefit of our userbase:

0 votes
5k views

Hello,

I am using mountain chart to draw some data. First time open the chart screen, the graph plots properly. If we do scroll forward the graph x-axis last label is missing. If we do scroll backward the graph x-axis first label is missing.

Here I have attached working .swift file.

Note: We are using mountain chart with multiple line series. We are not using stacked mountain chart.

0 votes
5k views

Hi,
Currently i need to generate a report with sciChart surface printed on it. is it possible to call sciChart surface in Crystal Report to getdata Printed as i am looking for customized report. i have printed sciChart using following code
var dialog = new PrintDialog();
if (dialog.ShowDialog() == true)
{
dialog.PrintVisual(sciChart , “Chart”);
}
thanx regards
Sushant

0 votes
7k views

My application is support .Net framework3.5. I only use 2D chart. Can i get SCIChart DLLs for support .Net Framework3.5 after i purchase licenses?

  • kin mei asked 8 years ago
  • last active 8 years ago
0 votes
7k 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
1 vote
0 answers
6k views

I have a chart with stacked xAxes, and I am trying to calculate the stackedLength of each xAxis base on the total length or width available for the xAxes.

The issue come when I am changing the size of the screen or changing the width of the chart using flex-basis. When I do that, I get the error message in the picture below.

My question is, is there a way for me to listen/subscribe to the width change or get the latest width?

  • Nung Khual asked 9 months ago
  • last active 9 months ago
3 votes
16k views

Hi

I am trying to allow my user to hide/show annotations by binding the visibility property, but I can’t seem to get it to work. Actually when I manually set visibility to Hidden it’s still there. Is that just not implemented?

Lisbeth

1 vote
0 answers
10k views

Hello,

When I apply the cross marker type to a scatter plot, it’s not centered correctly. It gets more off-center the thicker the stroke becomes. This tends to be the case for any mark that uses the strokeStyle parameter.

This is actually visible in the example app under “Using PointMarkers”. In the attached screenshot of the example app, I increased the cross marker thickness to 15 to show how off-center the cross is to the line. This becomes a bigger issue in a scatter series as there’s no line to reference of where the point should actually be.

Hopefully there’s a way to fix this, but if not, any help on how to apply a corrective offset would be great.

Thanks in advance for any guidance!

0 votes
3k views

Hi,

I’m building a heatmap with UniformHeatmapRenderableSeries I would like to know if it is possible to get some text inside each block.
I would like to display the block size when I zoom in like this https://www.scichart.com/example/android-heatmap-chart-with-text-example/.
Do you have any suggestions?

Best Regards,
Gabriel

1 vote
2k views

Hi.
My colleagues have used on their WPF application SciChartScrollbar to select a portion of a created graph. I want to use the same behavior on Xamarin.Android. What can I use to have the same effect?
Thank you.

0 votes
5k views

Hi,

I’d like to set line chart’s date xAxis ticks to be exactly one day apart in a way that where the label is shown, the time would be exactly 24:00.
I know I can set the minorDelta() and majorDelta(), but what value should I provide them? The minor tick when I zoom in should be 2 minutes and the major tick should be 24 hours.

0 votes
14k views

I can’t seem to find it in the API, but I figured I’d ask .Is any built in support for live editing the Chart Title or Axis Titles right on the chart surface like you can with a TextAnnotation?

1 vote
12k 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).

0 votes
11k views

Hello,

Just curious. Is there a maximum amount of Y-Axes that can be shown on a graph?

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?

1 vote
9k views

I’m reworking existing functionality to use SciChart. I need the resulting graph to look identical to original solution (or as close as possible).

In the screenshot you can see where I got so far (top) compared to the old solution (bottom). I got stuck trying to make the labels work.

I implemented a custom label provider as described here https://www.scichart.com/screenshots-xps-printing-x-axis-text-labels/ (I basically just took the CustomLabelProviderClass from there) I use the same list of labels as the old solution. What you see is as far as I got, using the following axis properties:

VisibleRange=”0,115″
DrawMajorGridLines=”False”
DrawMinorGridLines=”False”
LabelProvider =”{Binding LabelProvider}”
TickLabelStyle=”{StaticResource AxisLabelStyle}”
AutoTicks=”False”
MajorDelta=”0.5″
MinorsPerMajor=”1″
MinorDelta=”0.5″

The old graph does actually skip some of the values as well (about every other, unless I zoom in) but it still displays them with about double the density of the SciChart. Is there a way to make SciChart behave the same?

Also, I applied rotation transform on the labels to get them vertical. As you can see, now they stick into the graph. Is there a way to move them down a bit?

0 votes
11k views

Hi again.

For time to time we get into a situation where the entire GUI freezes. When investigating the application dump, the freeze is found to be located in the constructor of BitmapContext, or rather inside a .Net-method called as a result of the constructor. The area of interest seems to be the use of the BackBuffer property of WriteableBitmap. This in turn ends up waiting for an event inside AcquireBackBuffer (the ManualResetEvent variable is called _copyCompletedEvent). On MSDN Microsoft states that one should call the Lock- and Unlock-methods when updating the back buffer ( http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.backbuffer(v=vs.110).aspx). I seems like this is not always the case in the SciChart source code, but I’m unable to determine if this can cause the lock.

Call stack:
mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext) + 0x2b bytes
mscorlib.dll!System.Threading.WaitHandle.WaitOne(System.TimeSpan timeout, bool exitContext) + 0x6e bytes
PresentationCore.dll!System.Windows.Media.Imaging.WriteableBitmap.AcquireBackBuffer(System.TimeSpan timeout, bool waitForCopy) + 0x37 bytes
> PresentationCore.dll!System.Windows.Media.Imaging.WriteableBitmap.TryLock(System.Windows.Duration timeout) + 0x10c bytes
Abt.Controls.SciChart.Wpf.2.2.dll!System.Windows.Media.Imaging.BitmapContext.BitmapContext(System.Windows.Media.Imaging.WriteableBitmap c1505829363987065354c2524c41152e4) + 0xa6 bytes
Abt.Controls.SciChart.Wpf.2.2.dll!A.c6e54b260f3e614b850e733a2116b4878.c6e54b260f3e614b850e733a2116b4878(System.Windows.Controls.Image c9f773d96fd8c18abf23cfdb63f49fe85, System.Windows.Media.Imaging.WriteableBitmap ce748be01e2f961df40736b3a402f6c8a, Abt.Controls.SciChart.Rendering.Common.SizeF cacf0a4a95d1143f0c11e20d4508e7132, A.c1712c9b21919ce890684525c1002f4a7 c10fe853bbcfc02fab8756c021ff9007b) + 0xb7 bytes
Abt.Controls.SciChart.Wpf.2.2.dll!A.ccd89db9dd1768b91d35b2d2bb15f2f07.cb398c793fba70ab574d5eb126a856bcf(System.Windows.Media.Imaging.WriteableBitmap c1505829363987065354c2524c41152e4, System.Windows.Controls.Image c9f773d96fd8c18abf23cfdb63f49fe85, A.c1712c9b21919ce890684525c1002f4a7 c10fe853bbcfc02fab8756c021ff9007b) + 0x61 bytes
Abt.Controls.SciChart.Wpf.2.2.dll!Abt.Controls.SciChart.Visuals.Axes.AxisBase.OnDraw(Abt.Controls.SciChart.Rendering.Common.IRenderContext2D renderContext, Abt.Controls.SciChart.Visuals.RenderableSeries.IRenderPassData renderPassData) + 0x82 bytes
Abt.Controls.SciChart.Wpf.2.2.dll!A.cda144392e546b245ef5bb1ee71f22b3a.c6a7d2b5be124728330bbf562594a9bb9(Abt.Controls.SciChart.Visuals.ISciChartSurface c17037e8328cd0abc02d2a6957dfa450c, Abt.Controls.SciChart.RenderPassInfo c16b8d70d2b6ecad8f9fca7ac3f5177b8, Abt.Controls.SciChart.Rendering.Common.IRenderContext2D c41db0419b661c8ac05a2aa6a1ea66092) + 0x66 bytes
Abt.Controls.SciChart.Wpf.2.2.dll!A.cda144392e546b245ef5bb1ee71f22b3a.RenderLoop(Abt.Controls.SciChart.Rendering.Common.IRenderContext2D renderContext) + 0x155 bytes
Abt.Controls.SciChart.Wpf.2.2.dll!Abt.Controls.SciChart.Visuals.SciChartSurface.ca065c0b671221e0e603d0e9bf2792494() + 0x3e bytes
Abt.Controls.SciChart.Wpf.2.2.dll!Abt.Controls.SciChart.Visuals.SciChartSurface.cc0485eb45a8d4f00283729754056deb8() + 0x3e bytes
Abt.Controls.SciChart.Wpf.2.2.dll!Abt.Controls.SciChart.Visuals.SciChartSurface.OnRenderSurfaceDraw(object sender, Abt.Controls.SciChart.Rendering.Common.DrawEventArgs e) + 0x84 bytes
Abt.Controls.SciChart.Wpf.2.2.dll!Abt.Controls.SciChart.Rendering.Common.RenderSurfaceBase.OnDraw() + 0x92 bytes
Abt.Controls.SciChart.Wpf.2.2.dll!Abt.Controls.SciChart.Rendering.Common.RenderSurfaceBase.OnCompositionTargetRendering(object sender, System.EventArgs e) + 0x1c bytes

Have you had any experience with this?

Best regards,
Bjørn Terje Svennes

0 votes
6k views

Hello!
I want to create a View with two graphs, where the two graphs provide an overview. By clicking (acitvating) one of it, it “jumps” into the main view and can than be zoomed get some tooltips. I found out, that the Dashboard examples provide me the solution, but as I am relatively at the beginning with WPF, they are a bit to complex for me. I also have the problem that I cannot Export a running solution. The *.sln is missing.

Maybe anyone can provide me an simple example, the issue is not to look good, just having an idea would be nice. Notice: I (hopefully) got, that the graphs are provided in a ListBox which then is binded, but everything behind this is not clear to me.

Thanks for help!

  • Kawai Lo asked 8 years ago
  • last active 10 months ago
1 vote
5k views

Hello.
I’m just started to use SciChart and I have a question. How I can mirror XAxis in order to values will be increased from right to left. It is not negative scale but this view is more familiar for users (now I remake the old application). P.S. And be the best if additionally you show me how to make static XAxis with chosen range. I see the example in demo’s “Create Realtime Charts” section (my chart will be real-time too), but my application created via MVVM and I think this example not fully applicable to my case (but I fink after some investigation I will can remake example, but if you help me it be easier).

0 votes
10k views

I am using the LegendModifier to bind my RenderableSeries to my legend.

In my legends Datatemplate, I have a checkbox and a colour picker.

I notice the LegendData object is of ChartDataObjectBase type. I would like to group my data in my legend (eg, with a label), rather than just display the list.

Is this possible, similar to the images attached ?

0 votes
3k views

I’m migrating from v3.1, and it seems that in a later version you’ve changed the default appearance of the rollover modifier tooltip container, to be a green rectangle with a dark drop shadow (which looks awful sorry!). I’ve created an “empty” container style to remove this, but it looks like I have to apply this to every renderable series, using “s:RolloverModifier.TooltipContainerStyle=…”.
I look after a large application with dozens of charting controls, not only in XAML but also created programmatically, so this approach to applying the container style is making life fairly difficult! Is there any way to globally apply this container style to all renderable series types? I’ve tried applying it to BaseRenderableSeries but it doesn’t work:

    <Style TargetType="{x:Type s:BaseRenderableSeries}">
        <Setter Property="s:RolloverModifier.TooltipContainerStyle"
                Value="{StaticResource RolloverTooltipContainerStyle}" />
    </Style>

(It does work if I use a concrete TargetType such as FastLineRenderableSeries, but this would mean creating a style for every type of renderable series used across the application).

Similarly, the rollover “point marker” now has a drop shadow. Is there a way to globally remove the drop shadow, but ensure that the ellipse continues to be coloured to match the series stroke colour?

0 votes
6k views

Hello all,

our application is recording data points from a measurement device. The recorded data points are shown in a 2D and 3D chart. Both charts are within one page, the user can switch between the charts via TabControl.

The problem we have is, that when a new data point is added, the chart, which is not in focus (so not selected by the TabControl) does not update.
For the 2D chart we could solve this issue by executing the following code on the TabControl selection changed event:

this.ViewportManager.BeginInvoke(() => { this.ViewportManager.ZoomExtents(); });

For the 3D chart we tried the same approach with the following code (also exectue on the TabControl selection changed event), the function ScaleWorldDimensions adjust the 3D space based on the recorded data:

   Application.Current.Dispatcher.Invoke(() =>
        {
            if (this.ListDataPoints.Count > 0)
            {
                this.ScaleWorldDimensions(this.ListDataPoints);
                this.Surface3D.ViewportManager.ZoomExtents();
            }
        });

But unfortunately this does not solve the issue. Therfore the user either has to switch the tab again or add a new data point when the 3D chart is selected.

Do have hints on how to solve this issue?

Thanks for your support in advanced, in case you need furhter information please let me know.

0 votes
4k views

Dear SCICharts support:
We have a very large project that must be migrated to version 3 because right it uses version 2.
I am stuck in the following issues:

1/ I cannot convert Double or Date to ISCIComparable.

Our x axis contains Date-timestamp values and I am trying to find the index of the dataseries.xValues of a specific Date having as parameter my Date value which is Date type and not ISCIComparable.
How can I do this ?

When I try my attempt 1:

let x: Double = <DoubleValue>
let index = dataSeries.xValues.findIndex(of: x, searchMode: .nearest, isSorted: true) 

I am getting the build error: “Cannot convert value of type ‘Date?’ to expected argument type ‘ISCIComparable?'”

When I try my attempt 2:

If I also try to iterate the xValues and find the ISCIComparable value which has doubleValue equal the x then I get the error “Type ‘ISCIList?’ does not conform to protocol ‘Sequence'”
I mean something like this:

let x: Date = Date()
var comparableValue: ISCIComparable? = nil
for val in dataSeries.xValues {
    if val.toDate() == x {
        comparableValue = val
    }
}

So any solution please ?

2/ I am trying to update the last point of dataSeries using this code:

let lastPoint = dataSeries.count - 1
if let open = dataSeries.openValues.value(at: lastPoint) {
        dataSeries.update( open: open,
                                    high: max(dataSeries.highValues().value(at: lastPoint).toDouble(), mbidPrice),
                                    low: min(dataSeries.lowValues().value(at: lastPoint).toDouble(), mbidPrice),
                                    close: mbidPrice,
                                    at: lastPoint)     }

and I get the error “Cannot convert value of type ‘ISCIComparable’ to expected argument type ‘ISCIValues?’ “
Why ? How should I do this ?

Thanks a lot in advance

  • Dxat asked 4 years ago
  • last active 4 years ago
0 votes
5k views

Dear SciChart Team:

I want to have two vertical lines on the graph and get the spacing of the two lines as the mouse moves,
as shown in the attached picture.

Can you provide a simple example showing the architecture of this feature?

  • Johnny Yeh asked 5 years ago
  • last active 5 years ago
0 votes
3k views

thank you for answer !

Additional questions
image is attached

q1. last data only marker
q2. vertical dotted line (with rolloverModifier)

0 votes
10k views

Hi I am trying to create a vertical line annotation with MVVM annotationsbinding – this is due to having a chart group with 2 SciChartSurfaces sharing one X axis.

I have added a VerticalLineAnnotationViewModel to my

ObservableCollection Annotations

I would like the user to be able to create a vertical line with two labels, one with the X1 position and the other with some custom text.

I have tried adding an ObservableCollection AnnotationLabels to the VerticalLineAnnotationViewModel during instantiation however they don’t seem to appear.

As an alternative I tried a CustomAnnotation called CustomVerticalLine which inherited CustomAnnotation and then created a CustomVerticalLineViewModel which inherited CustomAnnotationViewModel and then overrode the ViewType to CustomVerticalLine. This displayed the two labels but then I couldn’t bind to the X1 value or the text property.

What am I doing wrongly, could anyone help please?

Thanks

0 votes
0 answers
4k views

I am implementing a waterfall chart with non-uniforma heatmap. I found that the live update doesn’t work. I keep updating the zValues with live data but the chart just show 1 row of data. If I resize the chart (my heatmap is inside a resizable container), I can see the updated data (i.e. Each time I resize the chart, the chart updated and show updated data). Do you have any example of live updated non-uniform heatmap? Below are my codes:

Draw the heatmap:

const SPECTROGRAM_HEIGHT = 256;
const SPECTROGRAM_WIDTH = 100;

const { sciChartSurface, wasmContext } = await SciChartSurface.create("spectrogram-chart-root");

const xAxis = new NumericAxis(wasmContext, {
    axisTitle: "Frequency",
    axisTitleStyle: {
        fontSize: CHART_STYLE.AXIS_FONT_SIZE,
        fontFamily: "sans-serif",
        fontWeight: "bold"
    },
    labelStyle: {
        fontSize: CHART_STYLE.LABEL_FONT_SIZE,
        fontFamily: "sans-serif"
    },
    labelFormat: ENumericFormat.Decimal,
    labelPrecision: 6,
    cursorLabelFormat: ENumericFormat.Decimal,
    cursorLabelPrecision: 6,
    drawMajorBands: false,
});

const yAxis = new NumericAxis(wasmContext, {
    axisTitle: "Time",
    axisTitleStyle: {
        fontSize: CHART_STYLE.AXIS_FONT_SIZE,
        fontFamily: "sans-serif",
        fontWeight: "bold"
    },
    labelStyle: {
        fontSize: CHART_STYLE.LABEL_FONT_SIZE,
        fontFamily: "sans-serif"
    },
    drawMajorBands: false,
});

// Add XAxis and YAxis
sciChartSurface.xAxes.add(xAxis);
sciChartSurface.yAxes.add(yAxis);

const colorMap = new HeatmapColorMap({
    minimum: -200,
    maximum: -50,
    gradientStops: [
    { offset: 0, color: "Transparent" },
    { offset: 0.01, color: COLORS.DARK_BLUE },
    { offset: 0.4, color: COLORS.BLUE },
    { offset: 0.5, color: COLORS.GREEN },
    { offset: 0.6, color: COLORS.YELLOW },
    { offset: 0.8, color: COLORS.RED },
    { offset: 1, color: COLORS.DARK_RED },
    ]
});

// Create a Heatmap Data-series. Pass heatValues as a number[][] to the UniformHeatmapDataSeries
zValues = Array.from(Array(SPECTROGRAM_HEIGHT), () => Array(SPECTROGRAM_WIDTH).fill(-200));

const heatmapSeries = new NonUniformHeatmapRenderableSeries(wasmContext, {
    dataSeries: new NonUniformHeatmapDataSeries(wasmContext, { zValues: zValues, xCellOffsets: getHeatmapXOffset, yCellOffsets: getHeatmapYOffset }),
    colorMap: colorMap,
    useLinearTextureFiltering: true,
    fillValuesOutOfRange: true,
});

// Add heatmap to the chart
sciChartSurface.renderableSeries.add(heatmapSeries);

I simply return the index for testing in the getHeatmapXOffset and getHeatmapYOffset functions:

    const getHeatmapXOffset = (index) => {
    return index;
};

const getHeatmapYOffset = (index) => {
    return index;
};

Reset zValues when number of data point changed:

        spectrogramZValues = Array.from(Array(SPECTROGRAM_HEIGHT), () => Array(newWidth).fill(-200));
        heatmapSeries.dataSeries.setZValues(spectrogramZValues);
        sciChartSurface.zoomExtents();

Update the zValues array when there is new data (I tried to add call zoomExtens() after notifyDataChanged but still didn’t work):

    spectrogramZValues.shift();
    spectrogramZValues.push(newData);
    heatmapSeries.current.dataSeries.notifyDataChanged();
  • Quyen Sy asked 12 months ago
  • last active 12 months ago
0 votes
7k views

For example, to draw a first part of a Line green and the second white? Or do you need multiple dataseries for that?

Especially I nee some areas of the line where there should be a “gap”, which could be done with multiple lines or (maybe easier from this totally beginner point of view) with one line, where some parts (the gaps) get black color.

I think, I will need multiple lines for that, but I wanted to be sure…

Thanks in advance.

  • Philip S. asked 6 years ago
  • last active 6 years ago
0 votes
5k views

I want to visualize Contour in my application and set the Contour Interval.
But the visualization is not as the expected value.
From your Example application: 3D Charts > Create A Surface Mesh Chart > Surface Mesh 3D With Contours. (Screenshot in attachment)
I have set the Contour Interval property slider to the maximum value (30).
But the result is less than 20, about 10.

How to make the Interval 30, and the visualization is really 30?
Are there any interval scaling property?

1 vote
3k views

Hi,

I would like to display the rollovermodifier line that must be parallel to the X axis and the Rollovermodifier line must be a dashed line. In the y axis I need to add a label annotation with svg .How can I fix the problem. Kindly provide me the solution.

This is the code I have given,

const horizontalline = new RolloverModifier({
IsEnabled: true,
DrawVerticalLine: true,
showTooltip: false,
rolloverLineStroke: “white”,
rolloverLineStrokeThickness : 1
})
sciChartSurface.chartModifiers.add(horizontalline);

  • Ayana VS asked 2 years ago
  • last active 2 years ago
0 votes
6k views

Hi,

I’m trying to export my graphs using the XamlRenderSurface and the ExportToXPS extension function.

I can export a BitmapImage from it fine but the xps image only has the Axis lines and a vertical annotation on it. See images for comparison.

Also, it outright crashes in some other graphs I have on Get MinorDelta because of a null reference exception, no additional info is given out by DebugWhySciCharDoesntRender = true. Likewise in this case, I can export to bitmap just fine. I am using custom tick providers.

I should also note that I’m rendering the charts from memory they’re not visually displayed when export them.

  • kewur asked 7 years ago
  • last active 7 years ago
0 votes
13k views

I believe there’s a typo in the code tab for the view model:
We have:
if (XVisibleRange.Max > ds0.Count)
{
var existingRange = _xVisibleRange;
var newRange = new IndexRange(existingRange.Min + 1, existingRange.Max + 1);
XVisibleRange = newRange;
}
but clearly the min value should not change (at least no here) since as result the real time values will not be in the visisble region. It might be an idea to update the sample code.
cheers
Claes

0 votes
3k views

My application intermittently output the following exception log:

System.InvalidOperationException: Enumerator version is invalid
Location: hbq`1.ghm.uqc()

InvalidOperationException could be thrown when a collection is modified while iterating of IEnumerable collection

However, it usually outputs the following exception message:
“Collection was modified; enumeration operation may not execute.”
(NOT is “Enumerator version is invalid”)

When and under what conditions can this exceptions occur?

When an exception occurs, the call stack is as follows:

SciChart.Data.dll!hbq.ghm.uqc()
SciChart.Data.dll!hbq.ghm.MoveNext()
System.Core.dll!System.Linq.Enumerable.Any(System.Collections.Generic.IEnumerable source)
SciChart.Charting.dll!SciChart.Charting.Model.DataSeries.DataSeries<double, double>.GetIndicesRange(SciChart.Data.Model.IRange range, SciChart.Charting.Common.Extensions.SearchMode downSearchMode, SciChart.Charting.Common.Extensions.SearchMode upSearchMode)
SciChart.Charting.dll!SciChart.Charting.ChartModifiers.SeriesValueModifier.kly(SciChart.Charting.Visuals.RenderableSeries.IRenderableSeries gsv)
SciChart.Charting.dll!SciChart.Charting.ChartModifiers.SeriesValueModifier.OnParentSurfaceRendered(SciChart.Charting.Utility.SciChartRenderedMessage e)
SciChart.Core.dll!TinyMessenger.TinyMessengerHub.ptc<SciChart.Charting.Utility.SciChartRenderedMessage>.Deliver(TinyMessenger.ITinyMessage message)
SciChart.Core.dll!TinyMessenger.DefaultTinyMessageProxy.Deliver(TinyMessenger.ITinyMessage message, TinyMessenger.ITinyMessageSubscription subscription)
SciChart.Core.dll!TinyMessenger.TinyMessengerHub.ptg<SciChart.Charting.Utility.SciChartRenderedMessage>.hyi(TinyMessenger.TinyMessengerHub.ptd ayb)
mscorlib.dll!System.Collections.Generic.List<TinyMessenger.TinyMessengerHub.ptd>.ForEach(System.Action<TinyMessenger.TinyMessengerHub.ptd> action)
SciChart.Core.dll!TinyMessenger.TinyMessengerHub.fbs<SciChart.Charting.Utility.SciChartRenderedMessage>(SciChart.Charting.Utility.SciChartRenderedMessage axj)
SciChart.Core.dll!TinyMessenger.TinyMessengerHub.Publish<SciChart.Charting.Utility.SciChartRenderedMessage>(SciChart.Charting.Utility.SciChartRenderedMessage message)
SciChart.Charting.dll!sjd.urk(SciChart.Charting.Visuals.ISciChartSurface ccg, SciChart.Charting.Services.RenderPassInfo cch, SciChart.Drawing.Common.IRenderContext2D cci)
SciChart.Charting.dll!sjd.RenderLoop(SciChart.Drawing.Common.IRenderContext2D renderContext)
SciChart.Charting.dll!SciChart.Charting.Visuals.SciChartSurface.DoDrawingLoop()
SciChart.Charting.dll!SciChart.Charting.Visuals.SciChartSurface.hjp()
SciChart.Core.dll!SciChart.Core.Utility.CompositionSyncedDelegate.otw(object bdd, object bde)

1 vote
13k views

Hi, i have follow the guide to create a chart but i would insert data every 1 second in a Line chart… i have do it but this is the result.

Showing 151 - 200 of 4k results