SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes


I get data from reading an URL so I save them (prepared) to a Arraylist (type PieSegment). How can I add the PieSegments from the Arraylist with (for example a loop) to my Piechart?

BR and thank you very much.

0 votes
0 answers

Hi EveryBody,

I hope you are fine,

I am working on tablet windows with only one DataSerie vizualisation.

To increase the ergonomic of my application on DatapointSelection, I want to be able to click on any point in the scichart then the DataPoint corresponding to the X axes of my point click get Selected.

Is it possible? Can you help me please.

I sent a picture to explain you the needed functionnality.

Thank you very much,

Princy Andriampaniry

0 votes

Hi everyone,

I’m working on a 2D chart on Android that requires the distance between major axes to be exactly 5 millimetres. How do I configure the major axis delta/ticks or resize the chart to meet my need?

Thank you.

0 votes

Hello everybody,

I hope you are fine,

I am working with DatapointeselectionModifier on a tablet windows.

I want to be able to select multiple points without pressing Left Ctrl keyboard.
Can you help me please?

Thank you very much.

0 votes


I want to use the MultiplePieDonutChart. Like in the example, I want to have a touch tooltip.
I tried it with that code:

LinearLayout chartLayout = (LinearLayout) root.findViewById(;
SciChartLegend legend = root.findViewById(;



    final SciChartBuilder sciChartBuilder = SciChartBuilder.instance();

    final IPieRenderableSeries pieSeries = sciChartBuilder.newPieSeries().withSeriesName("HowPeopleTravel").withSegments(
            sciChartBuilder.newPieSegment().withValue(34).withTitle("Ecologic").withRadialGradientColors(0xff84BC3D, 0xff5B8829).build(),
            sciChartBuilder.newPieSegment().withValue(34.4).withTitle("Municipal").withRadialGradientColors(0xffe04a2f, 0xffB7161B).build(),
            sciChartBuilder.newPieSegment().withValue(31.6).withTitle("Personal").withRadialGradientColors(0xff4AB6C1, 0xff2182AD).build()
    final IPieRenderableSeries donutSeries = sciChartBuilder.newDonutSeries().withSeriesName("DetailedGroup").withSegments(
            sciChartBuilder.newPieSegment().withValue(28.8).withTitle("Walking").withRadialGradientColors(0xff84BC3D, 0xff5B8829).build(),
            sciChartBuilder.newPieSegment().withValue(5.2).withTitle("Bicycle").withRadialGradientColors(0xff84BC3D, 0xff5B8829).build(),
            sciChartBuilder.newPieSegment().withValue(12.3).withTitle("Metro").withRadialGradientColors(0xffe04a2f, 0xffB7161B).build(),
            sciChartBuilder.newPieSegment().withValue(3.5).withTitle("Tram").withRadialGradientColors(0xffe04a2f, 0xffB7161B).build(),
            sciChartBuilder.newPieSegment().withValue(5.9).withTitle("Rail").withRadialGradientColors(0xffe04a2f, 0xffB7161B).build(),
            sciChartBuilder.newPieSegment().withValue(9.7).withTitle("Bus").withRadialGradientColors(0xffe04a2f, 0xffB7161B).build(),
            sciChartBuilder.newPieSegment().withValue(3.0).withTitle("Taxi").withRadialGradientColors(0xffe04a2f, 0xffB7161B).build(),
            sciChartBuilder.newPieSegment().withValue(23.2).withTitle("Car").withRadialGradientColors(0xff4AB6C1, 0xff2182AD).build(),
            sciChartBuilder.newPieSegment().withValue(3.1).withTitle("Motorcycle").withRadialGradientColors(0xff4AB6C1, 0xff2182AD).build(),
            sciChartBuilder.newPieSegment().withValue(5.3).withTitle("Other").withRadialGradientColors(0xff4AB6C1, 0xff2182AD).build()

    Collections.addAll(surface.getRenderableSeries(), pieSeries, donutSeries);
    Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newLegendModifier(legend).withShowCheckBoxes(false).withSourceSeries(pieSeries).build(), new PieChartTooltipModifier());

But if I touch on the chart I didn’t get the tooltip. As you see I have nearly copy all the code of the Example but I do not work. Where is my fault?

0 votes


I have a list of 12 items, but at the start I only want to see the last 6 items on the chart (stacked column chart). I want to be able to scroll / drag to reveal the first part of the list. I use the index of the list for the x-axis, so the list has indexes with range from [0, 11]

I’m having some weird behaviour implementing this.
When the data is loaded, i see the complete bars:

creenshot 2020-09-18 at 11.04.14.png

but when I start to scroll, i’m never able to reveal the complete bars anymore:
![Screenshot 2020-09-18 at 11.04.40.png][2]
![Screenshot 2020-09-18 at 11.04.59.png][3]

When i start scrolling to the end (although the chart is already at the end), the UI jumps and only shows half a bar. Also when i scroll to the beginning, it only shows half a bar.

How can I make sure I always see the complete bars?

This is the code, specific to the x axis & the scrolling:

val xAxis = sciChartBuilder.newNumericAxis()
            .withVisibleRange(5.5, 11.5)

using half values for the range seems to be the only way I can see the full bars. Once I start scrolling I only see half bars at the start & end

val surfaceChartModifiers: ChartModifierCollection = chart.chartModifiers
val dragModifier = XAxisDragModifier()
dragModifier.dragMode = AxisDragModifierBase.AxisDragMode.Pan

val zoomPanModifier = ZoomPanModifier()
zoomPanModifier.clipModeX = ClipMode.ClipAtExtents
zoomPanModifier.direction = Direction2D.XDirection
zoomPanModifier.zoomExtentsY = false
0 votes


I figure there is probably a way to do this, but I haven’t figured it out yet.

I would like remove (or maybe just make transparent?) my chart areas top and right borders, leaving the lefthand and bottom alone. I’ve attached an image with the borders circled that I would like to remove to make it clear.

Thank you.

  • C Bolton asked 2 weeks ago
  • last active 2 weeks ago
0 votes
0 answers

While moving the rollover cursor, if the number of series under the cursor increases, the rollover cursor labels become wrongly positioned. This ViewController subclass Swift example reproduces the problem.

import UIKit
import SciChart

class ViewController: UIViewController {
    // Surface is added in Storyboard
    @IBOutlet weak var surface: SCIChartSurface!
    override func viewDidLoad() {

        let xAxis = SCINumericAxis()
        let yAxis = SCINumericAxis()
        xAxis.visibleRange = SCIDoubleRange(min: 0, max: 260)
        yAxis.visibleRange = SCIDoubleRange(min: -5, max:12)
        yAxis.autoRange = .never

        self.surface.chartModifiers.add(items: SCIRolloverModifier())
            renderableSeries( 10...50, 10, .red),
            renderableSeries(150...250, 8, .green),
            renderableSeries( 10...100, 2, .cyan),
            renderableSeries(200...250, 0, .orange),
            renderableSeries( 10...250, 5, .white)
    func renderableSeries(_ xValues:ClosedRange<Int>, _ yValue:Double, _ color:UIColor) -> SCIFastLineRenderableSeries {
        let series = SCIXyDataSeries(xType: .double, yType: .double)
        xValues.forEach { series.append(x: $0, y: yValue ) }
        let rSeries = SCIFastLineRenderableSeries()
        rSeries.dataSeries = series
        rSeries.strokeStyle = SCISolidPenStyle(color: color, thickness: 4)
        return rSeries
0 votes

I did deactivate license in my Windows 7 computer, then successfully activate on my Windows 10 computer. SciChart stop working.

Exception: Sorry! Your support subscription expired on 4/5/2017 12:00:00 AM. This license key is only valid on earlier versions of SciChart. Please contact if you would like to renew your subscription.:

My old Windows 7 computer have SciChart SDK V5.0.0.10963 Installed 12/07/2017
My new Windows 10 computer have SciChart SDK V5.0.0.10963 installed 08/24/2020

It is the same version on both computers. I do not want to renew subscription. I want to use my license. What I should do?


0 votes


I’m trying to colour individual points in what is a reasonably large scatter data set and when I enable the palette provider I get a System.AccessViolationException: ‘Attempted to read or write protected memory. This is often an indication that other memory is corrupt.’

I’ve managed to reproduce this in a test project. The code is provided below. The chart surface is set up pretty normally with these switches:

s:VisualXcceleratorEngine.FallbackType="{x:Type s:HighQualityRenderSurface}"
s:VisualXcceleratorEngine.EnableImpossibleMode="True" RenderPriority="Immediate" EnableMultiThreadedRendering="True"

Any ideas what is going on here or how I can fix it?

private int NUM_VALUES = 300000;
    public MainWindow()
        DataContext = this;

    private void CreateGraph()
        var series = new XyDataSeries<double, double>();

        Random rand = new Random();
        int index = 0;
        int numAppends = 10;
        for (int j = 0; j < numAppends; j++)
            double[] x = new double[NUM_VALUES/ numAppends];
            double[] y = new double[NUM_VALUES/ numAppends];
            PointMetadata[] m = new PointMetadata[NUM_VALUES/ numAppends];
            for (int i = 0; i < NUM_VALUES / numAppends; i++)
                x[i] = index*0.001;
                y[i] = rand.NextDouble() * 100;
                m[i] = new PointMetadata(Color.FromRgb((byte)(rand.NextDouble() * 255), (byte)(rand.NextDouble() * 255), (byte)(rand.NextDouble() * 255)));
            series.Append(x, y, m);

        scatterRenderSeries.DataSeries = series;

    private void EnablePalette(object sender, RoutedEventArgs e)
        scatterRenderSeries.PaletteProvider = new MainChartPaletteProvider();

public class MainChartPaletteProvider : IPointMarkerPaletteProvider
    private PointPaletteInfo pointPaletteOverride;
    public void OnBeginSeriesDraw(IRenderableSeries rSeries)

        pointPaletteOverride = new PointPaletteInfo();
        pointPaletteOverride.Fill = Colors.Red;

    public PointPaletteInfo? OverridePointMarker(IRenderableSeries rSeries, int index, IPointMetadata metadata)
        if (metadata == null)
            return pointPaletteOverride;
        pointPaletteOverride.Fill = (metadata as PointMetadata).Colour;
        return pointPaletteOverride;

public class PointMetadata : IPointMetadata
    public Color Colour { get; set; }

    public bool IsSelected { get; set; }

    public event PropertyChangedEventHandler PropertyChanged;

    public PointMetadata(Color colour)
        Colour = colour;
0 votes
0 answers


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
0 answers


I’ve been testing the CAD objects option in the 3D chart API recently, and been wondering if there’s a way to control some of the objects properties after it is loaded, for example changing it’s position or rotation to simulate movement. I’ve tried to set these properties for a certain object I’ve loaded in the code behind with a DispatcherTimer, but it did not affect any of the properties I’ve tried to modify in my Tick event handler. Is there a proper way to achieve it?

Thank you!

0 votes
0 answers


I need to create complicated candle stick, beside OHLC, I need to put point market inside candle to mark mean and 50% percentile, each with an individual point marker, is it possible to achieve this?



0 votes


I’ve been wondering. In SciChart’s current WPF version, is there any way to configure the default ViewportManager (or create a new customized one in a simple way) such that whenever I call its ZoomExtents method, the X and Y axes’ ranges will include any custom annotations I’ve added to the chart’s annotations collection?

My custom annotations are basically Images, with fixed Width and Height, and I set their X1 and Y1 properties to hold certain data points I have on the chart. The issue is, I need axes’ ranges to include the Image in it’s entirety, meaning I would have to somehow convert their Widths and Heights to “data point values”, since the new visible range should be in terms of data values, if I’m not mistaken.

Any good example to how this could be done?

  • Ilan Rozen asked 4 weeks ago
  • last active 4 weeks ago
0 votes
0 answers

I am trying to chart time series data with one X axis and multiple YAxis, as well as this i am using a vertical line and text box annotation to mark the timestamp when an event occurred. The problem i am having is that the milliseconds portion of the annotation timestamp is being ignored and the annotation is snapping to the the major grid line on the whole second which leads to an misinterpretation by users where the actual event occurred.

In the attached image the event timestamp is 18:13.496 but the annotation is drawn at 18:13.000 exactly. See the thin blue line with 420207 text above. The line should sit nearly at the right border of the chart.

the timestamp (defined as triggerTime) correctly includes the millisecond portion.

The annotations are added as such…

sciChartSurface.Annotations.Add(new TextAnnotation {
Text = EventCode,
FontSize = 10,
XAxisId = “DefaultXAxis”,
X1 = triggerTime,
Y1 = 9.0});

sciChartSurface.Annotations.Add(new VerticalLineAnnotation{
LabelPlacement = LabelPlacement.Auto,
Stroke = Brushes.CornflowerBlue,
XAxisId = “DefaultXAxis”,
X1 = triggerTime,
Y1 = 9.0,
StrokeThickness = 1,
IsEditable = false,
ShowLabel = false,
VerticalAlignment = VerticalAlignment.Bottom });

And my xaxis defined as…

var xAxis = new DateTimeAxis() {
Id = “DefaultXAxis”,
TextFormatting = “dd-MMM-yyyy HH:mm:ss.fff”,
SubDayTextFormatting = StringExtentions.TimeSpanToTextFormatting(last – start),
AutoRange = AutoRange.Once,
VisibleRange = new DateRange(start, end),
GrowBy = new DoubleRange(0.01,0.01),
AxisAlignment = AxisAlignment.Bottom,
AutoTicks = true,
MinorsPerMajor = 5,
IsPrimaryAxis = true,
AxisTitle = “Time,” };

When debugging and looking at the SciChartSurface.Annotations.X1 value, it contains the millisecond value.

Any assistance is greatly appreciated.
Best regards

1 vote

I’m trying to put together a chart that adds a bar at the bottom, to visualise Y values going over specific thresholds (in this example, below 20 is Green, 20 to 30 range is Yellow, and over 30 is Orange), as shown here:

The bar scales along with the line when zooming the chart

The version pictured builds the bar using box annotations, each defined as below:

new BoxAnnotationViewModel()
    X1 = currentXValue,
    X2 = currentXValue, + xValuesStepSize,
    Y1 = 0.96,
    Y2 = 1,
    Background = backgroundColor, //Colour calculated based on Y value
    AnnotationCanvas = AnnotationCanvas.AboveChart,
    CoordinateMode = AnnotationCoordinateMode.RelativeY

This implementation works, but the issue is that the bar is drawn inside the main chart area, and so covers some of the chart itself; if this could just be moved onto the X axis, rather than the chart canvas, then this would be exactly what I need.

I tried to just switch the canvas on the BoxAnnotations to use AnnotationCanvas.XAxis, but when doing this the annotations don’t seem to be getting the right X / Y coordinates for positioning – the width and height of each block looks correct, and the width scales when the chart is zoomed in, but every block appears to be positioned at 0,0 on the XAxis canvas (it looks like X1/Y1 values are ignored, so all blocks are stacked on top of each other in the same position rather than appearing alongside each other as a bar)
BoxAnnotationsOnAxis BoxAnnotationsOnAxisZoomed

With a bit of searching I found an old post ( stating that ‘AxisMarkerAnnotation’ is the only supported annotation for display on an axis canvas, so I tried using this instead, which does seem to respect the X1 position. Here though, the X2 value seems be be interpreted as just a static pixel width, and the width of the annotations does not scale when the chart is zoomed, so the blocks stay as whatever width is initially drawn and get moved further apart the more the chart is zoomed in.
AxisMarkerAnnotations AxisMarkerAnnotationsZoomed

I’m new to SciChart so hopefully I’m missing something obvious; is there any way of either getting the BoxAnnotation to work on an axis canvas, or of setting an AxisMarkerAnnotation’s width to be the width between two points on the X axis, scaling along with the chart when zooming?

I hope the above makes sense, thanks in advance for your help.

0 votes
0 answers


We have an issue where the graph grid lines and tick markers do not show on iOS 10. Everything works on iOS 11 and up. Any idea why this is happening?

0 votes


I’m trying to add a small image as an annotation to the chart, but I couldn’t make it work… most likely doing something wrong, but I can’t quite figure out how this should be done. This is the direction I went for:

public void AddIcon()
        Image image = new Image();
        BitmapImage icon= new BitmapImage();
        icon.UriSource = new Uri(@"D:\icon.png", UriKind.Absolute);

        image.Source = icon;

        var annotation = new CustomAnnotation()
            X1 = 0,
            Y1 = 0,
            Content = image,

What am I doing wrong? is there a proper and simple way to add image annotations to the chart in an MVVM manner?

Thank you!

  • Ilan Rozen asked 4 weeks ago
  • last active 1 week ago
0 votes

I used box annotation like pic
in a boxAnnotation I used

.withPosition(1,-2, 0, 2)

and i made a 2 box like pic

i use box for drag one side to make a box big or small

the first box which is left doesn’t move anywhere.
it just can only drag that i want
but the second box, the box moves when i drag after first touch
the left box never moves on but right box moves first drags
just move first time not sometimes

am i wrong something?

  • Justin Lee asked 4 weeks ago
  • last active 3 weeks ago
0 votes


I’m trying to add custom text to a rollover cursor that is dependent on its X and Y Values.

For instance, if the Y Value is 1, but the X value (date) is old, it should say “1 ft Observed”, but if it the date is in the future, it should say “1 ft Predicted”. I can format the cursor label via NumericLabelProvider, but it only provides me the Y value, and I need the corresponding X value as well to properly format the cursor label.

    class NumericLabelProviderEx() : NumericLabelProvider() {
        override fun formatCursorLabel(doubleValue: Double): CharSequence {
            val formatString = "%.1f %s\n%s"
            // Any way to get corresponding X value for this so I can change "Observed" to "Predicted" if this point is in the future?
            val s = String.format(formatString, doubleValue, "ft", "Observed")
            return s


Is there an alternative approach to accomplish this within SciChart?

Thank you.

  • C Bolton asked 4 weeks ago
  • last active 4 weeks ago
0 votes


I have made the chart vertical by changing X axis alignment to left and Y axis alignment to bottom. After changing like this, im not able to resize the box annotation using all four resize adorners. Only two working, other two resetting Y1 value. below is the code snippet.

         X1="{Binding TopDepth, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
         X2="{Binding BottomDepth, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
         YAxisId="Top" />
         AxisTitle="Depth [ft]"
         FlipCoordinates="{Binding FlipYAxis}"
         TitleStyle="{StaticResource AxisTitleStyle}" />
         TitleStyle="{StaticResource AxisTitleStyle}" />

Can you please let me know what i’ve missed?


  • Sync Kumar asked 1 month ago
  • last active 4 days ago
0 votes
0 answers

Is it possible to use an image in a StackedColumn? I’d like to use a design in the columns instead of a solid color with Fill.

Edit: I figured out how…

So while you can’t assign an image directly to StackedColumn, per say, you can use various Brushes with Fill and one of those Brushes is the ImageBrush. It goes something like this:

stackedColumn.Fill =  = new ImageBrush(image: new BitmapImage(uriSource: new Uri(uriString: "Images/MyImage.png")));

I actually ended up using the LinearGradientBrush instead of ImageBrush for my needs and it works great!

  • Greg Knox asked 1 month ago
  • last active 4 weeks ago
0 votes

Newbie here…how would I fix the placement of the first and last tick label so that the tick label appears below the major grid line instead of left/right of it? Can’t seem to find an example that shows this.

For the shown graphs, the x-axis is actually a second static numeric axis while there is an additional time axis that is not shown.
So I believe changing the visible range of the visible axis is not an option as then it would no longer line up with hidden axis which has the points.

See attached image for illustration of problem.

0 votes

If an app generates multiple SciChartSurfaces, what happens when VisualXcceleratorEngine is enabled on one of them? Do other surfaces switch to the VisualXcceleratorEngine or remain in the software mode?

  • corvex asked 1 month ago
  • last active 1 month ago
0 votes


I’m trying to modifying Audio Analyzer Example.

This is scenario.

  1. Read wav file
  2. Calculate FFT (for all sample data of wav file)
  3. Display FFT result to FFT & Spectrogram chart.

The point is this : read all data at once and calulate FFT for dispaly in chart.

I already have FFT result with re[] and im[] type arrays.

  1. When I setting up X,Y axis of FFT chart, following code applied.
    Q. x,y axis and value setup is correct?

                // prepare fft input (dataF is float type sample data of wav file)
                double[] re = new double[dataF.length];
                double[] im = new double[dataF.length];
                double[] mag = new double[dataF.length];
                for(int ii=0; ii<dataF.length; ii++) {
                    re[ii] = (double)dataF[ii];
                    im[ii] = 0.0d;
                FFTf.transform(re, im);  // using Bluestein DFT algorithm.
                for(int nn=0; nn < re.length; nn++) {
                    mag[nn] = Math.sqrt(re[nn] * re[nn] + im[nn] * im[nn]);
                    if(nn <= 10 || re.length - 10 <= nn)
                // setup fft and x,y values
                for(int l=0; l < re.length/20; l++) {
                    fftDS.append((1.0*l*sampleRate/re.length), Math.sqrt(re[l] * re[l] + im[l] * im[l]));
  2. When I setting up X,Y axis of Spectrogram chart, following code applied.
    Q. x,y axis and value setup is correct?

                fftCount = dataProvider.getAudioDataByteSize() / 4096;
                spectrogramDS = new UniformHeatmapDataSeries<>(Long.class, Long.class, Double.class, re.length/20, fftCount);
                fftOffsetValueCount = (re.length/20)*fftCount - (re.length/20);
                spectrogramValues = new DoubleValues((re.length/20)*fftCount);
                // update spectrogram chart data
                for(int jj=0; jj < fftCount; jj += 4096) {
                    double[] spectrogramItems = spectrogramValues.getItemsArray();
                    double[] fftItems = getFrom(mag, 4096, jj);
                    System.arraycopy(spectrogramItems, re.length/20, spectrogramItems, 0, fftOffsetValueCount);
                    System.arraycopy(fftItems, 0, spectrogramItems, fftOffsetValueCount, re.length/20);

FFT chart is working but Spectrogram is not.

Thank you for your help!

0 votes

How do I know when user edited the text on TextAnnoation so the app can save it?
How to do the same for for Android and iOS version of SciChart?

0 votes

We recently upgraded from an old version of SciChart (3.1) and I’ve been updating our solution to use the latest binaries. Previously, we were setting the series source of a chart based on a trigger. However, after switching to the RenderableSeries=”{s:SeriesBinding …}” I discovered that we can’t use the SeriesBinding in a setter. Is there a way to do this with a trigger or do I need to do this in the code behind instead?

<Trigger Property="SelectedChannelSet" Value="0">
<Setter TargetName="DetailsChart" Property="SeriesSource" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ChartModel.ChannelOneAndTwoChartSeries}" />
<Trigger Property="SelectedChannelSet" Value="1">
<Setter TargetName="DetailsChart" Property="SeriesSource" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ChartModel.ChannelThreeAndFourChartSeries}" />



0 votes


I am using in my chart a VerticalSliceModifer with a VerticalLineAnnotation.
It works as expected, but I would like to modify the aspect of my VerticalLineAnnotation by adding a marker on the axis on top of the line, exactly as in the attached picture (not a scichart).
Is there a way to do that ?

Best regards,
Jean-Charles Durand

0 votes


I’m trying to convert Java code to swift and I need the AnnotationLabel’s setAxisLabelStyle equivalent.

AnnotationLabel annotationLabel = new AnnotationLabel(getContext());

            annotationLabel.setAxisLabelStyle(new Action1<AnnotationLabel>()
                public void execute(AnnotationLabel annotationLabel)
                    annotationLabel.setFontStyle(new FontStyle(37.0f, Color.BLUE));

How can i apply this code in swift?

0 votes

I would like to create a polar heat map .

Is it possible to create one using the current types – I have looked a the examples and just don’t see an obvious choice.

I have attached an example of a polar heat map.

1 vote


I’m trying to convert Java code to swift and I need the RolloverModifier class’s updateCurrentPoint method. I create CustomRolloverModifier class inherits from SCIRolloverModifier class and import SciChart.Protected.SCIRolloverModifier extension too. But i can’t find updateCurrentPoint method. What is the updateCurrentPoint equivalent method on swift?


0 votes

Lets assume we plot a moving signal window with a non-FIFO data series. Then, the dataseries can be updated in a loop with the fixed-length buffer (YArray) containing the latest signal samples :

using (sciChart.SuspendUpdates())
        SignalDataSeries.Append(XArray, YArray);

My question is whether the FIFO dataseries can be used to simplify the above code into

SignalDataSeries.Append(XArray, YArray);

given that we still use the same fixed-length YArray and FifoCapacity is set to its length? Are there any drawbacks in it, save for the doubling memory for the internal FIFO buffer?

  • corvex asked 1 month ago
  • last active 1 month ago
1 vote


I Need some help within the composite annotation resizing.

I created a composite annotation based on the composite annotations example. I need to calculate the range between to vertical line on the surface, so I took the MeasurmentXAnnotation.xaml as base code of mine.

however i need to be able to resize the composite annotation not only from the 4 edges (ResizingGrips), but also when the user drag the line annotations to left or to right.

Is there any way to achieve this?

Best regard

0 votes

SciChart running on iOS 13.6

Please see this short video which demonstrates the issue:

I have a chart showing a single Spline data series. The data series never drops below zero, yet the chart shows multiple points where the line drops below zero as you zoom in and out. This behavior changes as the zoom level changes.

Is this expected behavior for the spline chart? Is there a way to change the behavior so the chart does not show these sub-zero points?

private func drawChart()

    let series = self.getPositionSeries( name: name, color: color, results: resultsSession.rearResults )


private func createChartSurface()
    // If we created a chart surface previously then we need to remove it from the superview

    // Create a SCIChartSurface. This is a UIView so can be added directly to the UI
    sciChartSurface = SCIChartSurface()
    sciChartSurface?.translatesAutoresizingMaskIntoConstraints = false

    //sciChartSurface?.autoresizingMask = [.flexibleHeight, .flexibleWidth] // chart bottom falls off the view without this
    sciChartSurface?.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor).isActive = true
    sciChartSurface?.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true
    sciChartSurface?.leftAnchor.constraint(equalTo: self.view.leftAnchor).isActive = true
    sciChartSurface?.rightAnchor.constraint(equalTo: self.view.rightAnchor).isActive = true

    // Create an XAxis and YAxis. This step is mandatory before creating series
    let xaxis = SCINumericAxis()
    xaxis.axisTitle = "Seconds"

    let yaxis = SCINumericAxis()
    yaxis.axisTitle = "Position (mm)"
    yaxis.axisId = "p" // position
    yaxis.axisAlignment = .right

    let yaxis = SCINumericAxis()
    yaxis.axisTitle = "Speed mm/s"
    yaxis.axisId = "s" // speed
    yaxis.axisAlignment = .left


private func getPositionSeries( name: String, color: UIColor, results: ResultData ) -> SCISplineLineRenderableSeries
    let positionData = SCIXyDataSeries(xType: .double, yType: .double)
    positionData.seriesName = name
    let start = resultsSession.indexStart + 1
    let last = resultsSession.indexEnd

    for index in start ... last {
        let t1 = resultsSession.sensorData[index-1].time
        let t2 = resultsSession.sensorData[index].time
        if ((t2-t1) == 1) {
            let x = Double(t2) / resultsSession.sampleRate
            let y = results.axleData[index].position
            positionData.append(x: x, y: y)
        } else {
            // There was a gap in the data.  Fill in the gap with a horizontal line.
            let y = results.axleData[index-1].position
            for tx in (t1 + 1) ... t2 {
                let x = Double(tx) / resultsSession.sampleRate
                positionData.append(x:x, y:y)

    let positionSeries = SCISplineLineRenderableSeries()  // SCIFastLineRenderableSeries()
    positionSeries.dataSeries = positionData
    positionSeries.yAxisId = "p"
    positionSeries.strokeStyle = SCISolidPenStyle(color: color, thickness: 1.0)
    return positionSeries
0 votes


I would try out the examples with my trial but I got this error:

error: package io.reactivex does not exist import

I hope you can help me. Thank you.


PS.: I did everything like in the Tutorial

0 votes


How can i listen annotation selection changes? I try this code but i’m getting error “Cannot assign to property: ‘lineAnnotation’ is immutable”

var lineAnnotation = SCILineAnnotation()
lineAnnotation.annotationSelectionChangedListener = { (annotation, isSelected) in


0 votes


I develop a real time app that polls online data, e.g. EEG, and sends it on a SciChart plot. I need to keep the polling thread at maximal and steady time resolution, ideally, close to 1 ms. To achieve that, I run the Scichart plot in a different STA thread (WPF window), such that the polling thread uses only IDataSeries.Append() and IDataSeries. SuspendUpdates() methods to submit data to the plot.

However, time tests show that these 2 functions in the polling thread have very irregular execution times, which may depend on different factors, e.g. on the plot size. To demonstrate it, I recorded the calling times of the following code, which submits 10 000 samples in a loop:

            double StartTimeInMs = SW.ElapsedTicks / 10000;
            using (TestDataSeries.SuspendUpdates())                 
                    TestDataSeries.Append(X, Y);
            TimeDelta = SW.ElapsedTicks / 10000 - StartTimeInMs;

The resulting TimeDelta (loop times) are shown on the the plot 1 in the attachment.As you can see the loop time is unstable and grows to 40 ms, when the plot window is maximized.

I came to a possible solution by invoking the sample submission code in the plot thread:

            double StartTimeInMs = SW.ElapsedTicks / 10000;             
            Dispatcher D = (TestDataSeries.ParentSurface as SciChartSurface).Dispatcher;
            D.BeginInvoke((Action)(() =>
                    using (TestDataSeries.SuspendUpdates())
                        TestDataSeries.Append(X, Y);
            TimeDelta = SW.ElapsedTicks / 10000 - StartTimeInMs;

As you can on the attached plot 2, the loop times are much better now, although I still see occasional peaks above 5 ms.

So, my questions are:

  1. Why the timing in my tests is so unstable?
  2. Are the particular methods or settings to stabilize the time required to submit new samples to a Scichart plot?
  3. Are the FIFO series more stable in timing?
  4. If I use the BeginInvoke in a separate plot thread, should I use lock() to avoid potential data overflow, for instance:

                Dispatcher D = (TestDataSeries.ParentSurface as SciChartSurface).Dispatcher;
            D.BeginInvoke((Action)(() =>
                if (Monitor.TryEnter(TestDataSeries.SyncRoot, new TimeSpan(0, 0, 0, 0, 0)))
                        TestDataSeries.Append(X, Y);

Thank you in advance for answers and hints!

  • corvex asked 2 months ago
  • last active 1 month ago
0 votes


I’m trying to convert Java code to swift and I need the same CustomCategoryDateAxis class as Yura’s answer:

I try to inherit from SCICategoryDateAxis but there is no isZoomConstrainSatisfied and coerceVisibleRange overrides.

How can i write the same code in swift?


0 votes


I’ve the following problem.

We have an application where we have many spectrums (frequency or order spectrums). To get a better overview and to select one for a more detailed analysis, we would like to display them as a waterfall chart. A spectrum always has a high resolution of 32768 points. If I now display between 60 and 100 spectrums in a waterfall chart, it takes quite a long time to render this and it is almost impossible to operate the chart.

However, a high-resolution spectrum is not required for a good overview in the waterfall diagram. Therefore my idea is to resample every single spectrum to e.g. 8192 points and then display it in the waterfall diagram.

Is there a possibility to use the internal SciChart resampler (e.g. Min/Max) or do I have to develop an own algorithm for this?

Or does a similar function already exist in SciChart?


0 votes

want to show error marker in line series if data point is bad (isGoodValue=false). how to set metadata in android series

0 votes

I get the following output in my console:

Visual Xccelerator Engine v6.2.1.13304

GPU Capability Test ### Is BGRA feature required: TRUE

Examining Graphics Adapter: Intel(R) UHD Graphics 620 VRAM: 128Mb
DeiceId: 22807

Visual Xccelerator Engine Direct3D9 Compatibility
Determines whether the adapter is blacklisted due to its unstable work… FALSE
Trying to create Direct3D9 Device… SUCCESS

Visual Xccelerator Engine Direct3D11 Compatibility
Trying to create Direct3D9Ex Device (WPF Compatibility)… SUCCESS
Trying to create Direct3D11 Device… SUCCESS

Rank: 2100128 Points

Selected Graphics Adapter, where DeviceId is: 22807 Is Direct3D9
Supported: TRUE Is Direct3D11 Supported: TRUE Is Blacklisted:

Hey this is SciChart here. Please help! Your GPU is too slow for my
awesome graphics software! I detected you have an Intel(R) UHD
Graphics 620 GPU. Please upgrade it because I’m feeling very
constrained by 128MB of Video RAM. My super-powerful Visual
Xccelerator engine can do so much better with 256MB+ of video memory.
THX! 😀

Is there a way to suppress this so it doesn’t show up? I use trace output to capture diagnostics in my application and this is showing up in the log.

  • Doug Witt asked 2 months ago
  • last active 2 months ago
0 votes
0 answers


I’m working with the FastHistoBarRenderableSeries and I have an issue with the candle width.

When I scale the X-Axis the width of the candle grows very fast.

0 votes


I’m wanting to switch to SciChart from a previous charting library. One neat thing that our previous library did that I cannot figure out how to do in SciChart is change the interaction between tooltips/rollover and panning.

What I would like to do is Pan/Drag the chart on short tap events, and do a rollover or tooltip cursor on long tap events. By default it looks like I get rollover and panning together on any tap event, which is not ideal behavior for my apps. Depending on the tap event type, I would like to do just one or the other, not both. How can I do something similar with SciChart?

Thank you,

  • C Bolton asked 2 months ago
  • last active 2 months ago
0 votes

Hi SciChart-Team,

I’m currently rewrite one of our applications and move this from the leagacy .NET Framework to .NET Core.
I also replace the old SciChart.DirectX package and the DirectX Renderer plugin with the new VisualXcceleratorEngine witch is also based on DirectX.

In one chart we display a Order Spectrum as a heatmap (FastUniformHeatmapRenderableSeries) with linearly interpolated color between the cells. Thefore we activate the property UseLinearTextureFiltering.

But with the new VisualXcceleratorEngine is there no linearly interpolated color between the cells. Is this feature only available for the old DirectX Renderer plugin??


0 votes

Is it possible to show contour of bars in ColumnRenderableSeries3D?
Is there way to do this?

ColumnRenderableSeries3D has a Stroke property, but does not appear to have any effect on setting this property.

best regards

0 votes
0 answers

I am rendering a HeatMap on WPF page using FastUniformHeatmapRenderableSeries which has 3 axes X, Y and Z. The Z values are represented with colors by defining the color palette and gradients. This works perfectly. Now there a need to define color palette in such a way that it will get applied to different parts of the map based on min and max value at that area of the map. To elaborate more, the Z values are basically representing peaks at different areas. So there can be multiple peaks distributed on the map.

What I need is that the top-most part of each peak should be shown in red color and then going down till its base with change in color like orange, yellow, green and blue based on certain range in %. The point to note here is, every peak can have its own min and max values. Peak 1 can start from Z=15 and end at Z=48 and peak 2 can start from Z=3 and end at Z=20. So the colors in the palette should get distributed equally for both these peaks. Top-most area of peak 1 and that of peak 2 should be having same color.
Is this possible in heat map? having say a conditional color palette based on multiple value ranges?

0 votes


I have an ECG signal that gets plotted in real-time. I would like to highlight specific indices of the signal that have already been plotted using a different color than the original signal. How should I go about it?


0 votes


I was doing a custom pan zoom modifier to drag the chart by click and drop. The Y-axis works well and I can drag up and down but the X-axis instead of just moving it scales a lot.

The same thing happens when I implemented a mouse wheel scroll using the same functionality, is it possible that the last candle is anchored to the side of the graphic? or I’m just not using correctly the Scroll method?

Here is the code of the pan modifier

public override void OnModifierMouseMove(ModifierMouseArgs e)
        if (_lastPoint == null)

        if (!ModifierSurface.IsPointWithinBounds(e.MousePoint))


        var currentPoint = e.MousePoint;
        var xDelta = currentPoint.X - _lastPoint.Value.X;
        var yDelta = _lastPoint.Value.Y - currentPoint.Y;

        using (ParentSurface.SuspendUpdates())
            XAxis.Scroll(XAxis.IsHorizontalAxis ? xDelta : -xDelta, SciChart.Charting.ClipMode.None);
            YAxis.Scroll(YAxis.IsHorizontalAxis ? -xDelta : yDelta, SciChart.Charting.ClipMode.None);

        _lastPoint = currentPoint;

This is the XAML code

<!--  Create the chart surface with candlestick and histogram bars around each candlestick  -->
        ViewportManager="{Binding ViewportManager}">


                DataSeries="{Binding DataSeries, Mode=TwoWay}"
                HistogramMode="{Binding HistogramBarMode, Mode=TwoWay}"
                PaletteProvider="{StaticResource VolumeLadderThresholdPaletteProvider}"
                TickSize="{Binding TickSize, Mode=TwoWay}"
                VerticalBarSpacing="{Binding VerticalBarSpacing, Mode=TwoWay}"


                    <SolidColorBrush Color="#FF00A2FF" />

                    <SolidColorBrush Color="Red" ></SolidColorBrush>

                    <Style TargetType="s:HistogramBar">
                        <Setter Property="Stroke" Value="Black" />
                        <Setter Property="MinWidth" Value="200"/>
                        <Setter Property="MinHeight" Value="200"/>
                        <Setter Property="MaxHeight" Value="200"/>
                        <Setter Property="MaxWidth" Value="200"/>
                        <Setter Property="Height" Value="360"/>
                        <Setter Property="Margin"  Value="340"/>
                        <Setter Property="Fill" Value="red" />
                        <Setter Property="FontSize" Value="23" />
                        <!--<Setter Property=" Value="Red" />-->

                    <Style TargetType="s:HistogramBar">
                        <Setter Property="Stroke" Value="Black" />
                        <Setter Property="Fill" Value="#FF00A2FF" />


        <!--  Create an X Axis  -->
            <s:CategoryDateTimeAxis GrowBy="0.0, 0.1" DrawMajorBands="True" />

        <!--  Create a Y Axis with GrowBy  -->
            <s:NumericAxis GrowBy="0.1, 0.1" DrawMajorBands="True" />


            <s:ModifierGroup s:MouseManager.MouseEventGroup="SciChartGroup">
                <!--<s:MouseWheelZoomModifier x:Name="mouseWheelZoomModifier" 
                <!--<s:ZoomPanModifier x:Name="zoomPanModifier" 
                <s:ZoomExtentsModifier x:Name="zoomExtentsModifier"/>
                <!--<s:RubberBandXyZoomModifier x:Name="rubberBandXyZoomModifier" 
                <s:XAxisDragModifier DragMode="Scale"/>
                <s:YAxisDragModifier DragMode="Scale"/>
                <!--<s:RolloverModifier DrawVerticalLine="False"/>-->


Thanks 🙂

0 votes


I’m trying to display the value of the bars in the Market Profile chart. I was trying to add a text for each bar created but I don’t know where to find the surface position to instantiate the text.

This is the part of the code where the bars are created.

for (int i = 0; i < ticksPerCandle; i++)

                volume = _random.Next(100);
                bidOrAsk = _random.Next(2) == 0 ? BidOrAsk.Bid : BidOrAsk.Ask;

                //date = date;
                var newTick = _data[_index];
                var open = _dataSeries0.OpenValues[_candleCount - 1];
                high = _dataSeries0.HighValues[_candleCount - 1];
                high = high > newTick ? high : newTick;

                low = _dataSeries0.LowValues[_candleCount - 1];
                low = low < newTick ? low : newTick;

                var meta = (CandlestickMetaData)_dataSeries0.Metadata[_candleCount - 1];

                meta.AddTick(new CandleTick
                    BidOrAsk = bidOrAsk,
                    Price = newTick,
                    Volume = volume,
                    TimeStamp = date

This is how it should look like

0 votes

I’m trying to convert Android (Java) code to iOS (Swift), and I need to create a custom SCIZoomPanModifier. In the android code, onFling, onDown, and onDown were overridden, but I can’t seem to do that in iOS. How can I override onFling, onDown, and onUp in iOS to mimic the android code?


Showing 1 - 50 of 3k results