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

0 votes

I had recently integrated SciChart into my app, and faced some problems with chat appearance on trial mode which are described here:
Due to this problems I tried to run my app on an actual device, and got this build error from Xcode:

ld: building for iOS, but linking in dylib file (/Users/ruslansabirov/Library/Developer/Xcode/DerivedData/exinity-aupulhpegzsnlfcrnqfiwnvnljpj/Build/Products/Debug-iphoneos/SciChart.framework/SciChart) built for iOS Simulator, file ‘/Users/ruslansabirov/Library/Developer/Xcode/DerivedData/exinity-aupulhpegzsnlfcrnqfiwnvnljpj/Build/Products/Debug-iphoneos/SciChart.framework/SciChart’ for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can I fix this problem?

0 votes
0 answers

I was trying to test SciChart on simulator, but I have a problem: I added chart surface on my view, and after I launch an app, SciChart is showing me this text on the screen :
“Hardware rendering performance of SciChart in simulator is SLOW. Please use an actual device to feel the real-world performance”
How do I remove this text and test my charts on the simulator?

1 vote


I’d like to update the iOS version to the latest stable one (4.1.0), but after following the steps here:
Xcode keeps complaining:

framework not found SciChart.xcframework
clang: error: linker command failed with exit code 1

If I downgrade back to 3.1.1 everything works again. Any idea why the version 4.1.0 is not working? I’m using Pods to manage all dependencies.

0 votes

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
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 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?

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

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


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’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’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?


0 votes

Currently we have two graph surfaces with two Y axes on each side and we need all of the Y axes to have fixed width size. Until now we were achieving that like this:
topGraphSurface.LeftAxisAreaForcedSize = 45;
topGraphSurface.RightAxisAreaForcedSize = 45;
bottomGraphSurface.LeftAxisAreaForcedSize = 45;
bottomGraphSurface.RightAxisAreaForcedSize = 45;

but since updating to the new SciChart v3 we get the error “SciChartSurface does not contain a definition for (Left)AxisAreaForcedSize”. I couldn’t find any information about this in the Migration guide, so is there a way to achieve this in the new version?

1 vote


I need to display realtime chart with 20 series of data. My data is arriving at 500Hz. When I’m displaying this data, I find that after a while SciChart hangs with what appears to be a deadlock.

I’ve read as much as I can find about realtime graphing with SciChart and I started with tutorial 4 – Adding Realtime Updates. This article ( suggests that SciChart is thread safe so I tried using a second thread to feed data into a graph. My only change was to move from the main thread timer in the example to a GCD timer running at 500Hz. With this, I’m easily able to reproduce the deadlock in around 1.5 seconds.

Here is the main thread which is attempting to render:

Thread 1 Queue : (serial)
#0  0x0000000192bc8c20 in __psynch_rw_rdlock ()
#1  0x0000000192ae4864 in _pthread_rwlock_lock_wait ()
#2  0x0000000192ae47fc in _pthread_rwlock_lock_slow$VARIANT$mp ()
#3  0x0000000104a93828 in -[SCIRenderableSeriesLock initWithRenderableSeries:] ()
#4  0x0000000104ab742c in -[SCIRenderSurfaceRenderer p_SCI_updateCoreData:renderPassState:viewportSize:] ()
#5  0x0000000104ab6f4c in -[SCIRenderSurfaceRenderer p_SCI_renderLoop:assetManager:renderPassState:] ()
#6  0x0000000104ab6dc4 in -[SCIRenderSurfaceRenderer onDrawWithContext:andAssetManager:] ()
#7  0x00000001049c50c0 in -[SCIRenderSurfaceDrawable2D drawFrameIn:withDrawableSize:] ()
#8  0x0000000104ad4db8 in -[SCITwisterRendererBase drawFrameIn:withDrawableSize:] ()
#9  0x00000001049e56c8 in -[SCIMetalRenderer drawFrameIn:withDrawableSize:] ()
#10 0x0000000104a25b70 in -[SCIMetalRenderSurfaceBase draw] ()
#11 0x00000001999861ec in -[CALayer display] ()
#12 0x00000001999984d4 in CA::Layer::layout_and_display_if_needed(CA::Transaction*) ()
#13 0x00000001998e11d8 in CA::Context::commit_transaction(CA::Transaction*, double) ()
#14 0x000000019990ab78 in CA::Transaction::commit() ()
#15 0x000000019990b58c in CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) ()
#17 0x0000000192d4beb0 in __CFRunLoopDoObservers ()
#18 0x0000000192d4c32c in __CFRunLoopRun ()
#19 0x0000000192d4bc38 in CFRunLoopRunSpecific ()
#20 0x000000019d39a38c in GSEventRunModal ()
#21 0x0000000196e7c444 in UIApplicationMain ()
#22 0x00000001042cc478 in main at /Users/mall/Downloads/SciChart.iOS.Examples-SciChart_v3_Release/tutorials/tutorials-2d/Tutorial 04 - Adding Realtime Updates/Tutorial 04 - Adding Realtime Updates/AppDelegate.swift:5
#23 0x0000000192bd38f0 in start ()

and here is my worker thread adding data to a series:

Thread 11 Queue : (concurrent)
#0  0x0000000192bc8c20 in __psynch_rw_rdlock ()
#1  0x0000000192ae4864 in _pthread_rwlock_lock_wait ()
#2  0x0000000192ae47fc in _pthread_rwlock_lock_slow$VARIANT$mp ()
#3  0x0000000104ac1518 in -[SCIXDataSeries p_SCI_searchDataIndexOn:xMinAsDouble:xMaxAsDouble:downSearchMode:upSearchMode:] ()
#4  0x0000000104ac1368 in -[SCIXDataSeries getIndicesXRange:xMinAsDouble:xMaxAsDouble:isCategoryAxis:] ()
#5  0x0000000104ac1b34 in -[SCIXDataSeries getWindowYRangeWithXCoordCalc:getPositiveRange:] ()
#6  0x0000000104aceddc in -[SCIRenderableSeriesBase getYRange:positive:] ()
#7  0x00000001049b25ac in -[SCIRangeCalculationHelper2DBase getWindowedYRangeWithXCalculators:] ()
#8  0x0000000104a05f84 in -[SCIAxisBase getWindowedYRangeWithXRanges:] ()
#9  0x00000001049f4184 in -[SCIChartSurface p_SCI_zoomExtentsYWithCalculators:andDuration:] ()
#10 0x00000001049f3d14 in -[SCIChartSurface p_SCI_zoomExtentsWithDuration:] ()
#11 0x00000001042c79e8 in closure #1 in ViewController.handleTimer() at /Users/mall/Downloads/SciChart.iOS.Examples-SciChart_v3_Release/tutorials/tutorials-2d/Tutorial 04 - Adding Realtime Updates/Tutorial 04 - Adding Realtime Updates/ViewController.swift:84
#12 0x00000001042c7500 in thunk for @escaping @callee_guaranteed () -> () ()
#13 0x0000000104abdae0 in +[SCIUpdateSuspender usingWithSuspendable:withBlock:] ()
#14 0x00000001042c7824 in ViewController.handleTimer() at /Users/mall/Downloads/SciChart.iOS.Examples-SciChart_v3_Release/tutorials/tutorials-2d/Tutorial 04 - Adding Realtime Updates/Tutorial 04 - Adding Realtime Updates/ViewController.swift:79
#15 0x00000001042c9250 in partial apply ()
#16 0x00000001042cb1e4 in closure #1 in closure #1 in RepeatingTimer.timer.getter at /Users/mall/Downloads/SciChart.iOS.Examples-SciChart_v3_Release/tutorials/tutorials-2d/Tutorial 04 - Adding Realtime Updates/Tutorial 04 - Adding Realtime Updates/RepeatingTimer.swift:26
#17 0x00000001042c7500 in thunk for @escaping @callee_guaranteed () -> () ()
#18 0x0000000107093730 in _dispatch_client_callout ()
#19 0x0000000107096390 in _dispatch_continuation_pop ()
#20 0x00000001070a9614 in _dispatch_source_invoke ()
#21 0x00000001070a4d74 in _dispatch_root_queue_drain ()
#22 0x00000001070a5698 in _dispatch_worker_thread2 ()
#23 0x0000000192aeab38 in _pthread_wqthread ()

Here is my version of the ViewController class from Tutorial 4 with the GCD timer (note that it uses RepeatingTimer class found here: – my changes are marked with the //MALL comment:

import UIKit
import SciChart

class ViewController: UIViewController {

    private var timer = RepeatingTimer(timeInterval: 1.0/500.0)

    private let pointsCount = 200
    private var count: Int = 0

    private let lineData = SCIDoubleValues()
    private lazy var lineDataSeries: SCIXyDataSeries = {
        let lineDataSeries = SCIXyDataSeries(xType: .int, yType: .double)
        lineDataSeries.seriesName = "Line Series"
        lineDataSeries.fifoCapacity = 300
        return lineDataSeries
    private let scatterData = SCIDoubleValues()
    private lazy var scatterDataSeries: SCIXyDataSeries = {
        let scatterDataSeries = SCIXyDataSeries(xType: .int, yType: .double)
        scatterDataSeries.seriesName = "Scatter Series"
        scatterDataSeries.fifoCapacity = 300
        return scatterDataSeries

    private var surface: SCIChartSurface {
        return view as! SCIChartSurface

    override func loadView() {
        viewRespectsSystemMinimumLayoutMargins = false
        view = SCIChartSurface()

    override func viewDidLoad() {

        let xValues = SCIIntegerValues()
        for i in 0 ..< pointsCount {
            lineData.add(sin(Double(i) * 0.1))
            scatterData.add(cos(Double(i) * 0.1))
            count += 1
        lineDataSeries.append(x: xValues, y: lineData)
        scatterDataSeries.append(x: xValues, y: scatterData)

        let lineSeries = SCIFastLineRenderableSeries()
        lineSeries.dataSeries = lineDataSeries

        let pointMarker = SCIEllipsePointMarker()
        pointMarker.fillStyle = SCISolidBrushStyle(colorCode: 0xFF32CD32)
        pointMarker.size = CGSize(width: 10, height: 10)

        let scatterSeries = SCIXyScatterRenderableSeries()
        scatterSeries.dataSeries = scatterDataSeries
        scatterSeries.pointMarker = pointMarker

        let legendModifier = SCILegendModifier()
        legendModifier.orientation = .horizontal
        legendModifier.position = [.bottom, .centerHorizontal]
        legendModifier.margins = UIEdgeInsets(top: 0, left: 0, bottom: 10, right: 0)

        SCIUpdateSuspender.usingWith(self.surface) {
            self.surface.xAxes.add(items: SCINumericAxis())
            self.surface.yAxes.add(items: SCINumericAxis())
            self.surface.renderableSeries.add(items: lineSeries, scatterSeries)
            self.surface.chartModifiers.add(items: SCIPinchZoomModifier(), SCIZoomExtentsModifier())
            self.surface.chartModifiers.add(items: SCIRolloverModifier(), legendModifier)

        //  MALL
        timer.eventHandler = handleTimer

    //  MALL
    private func handleTimer() {
        let x = count
        SCIUpdateSuspender.usingWith(surface) {
            self.lineDataSeries.append(x: x, y: sin(Double(x) * 0.1))
            self.scatterDataSeries.append(x: x, y: cos(Double(x) * 0.1))

            // zoom series to fit viewport size into X-Axis direction
            self.count += 1

Thanks in advance for any help you can offer.

0 votes


In the real-time line chart, I want an animation like the video(link below).
Can you be provided with animations such as a point where a point drawn in real time continues to blink?

  • Jinsu Park asked 4 months ago
  • last active 4 months ago
0 votes

I am setting SCIDateTimeAxis as my XAxis by using the code:

let xAxis = SCIDateTimeAxis() = UIColor.darkGray
xAxis.textFormatting = “dd MMM”
xAxis.visibleRange = SCIDateRange(dateMin: 2019-07-29 11:30:00, max:2019-07-29 11:30:00)

As I have a requirement to change the application Language to THI.
How can I set the locale to the axis, so the label visible on the axis should displayed in THI language.

As right now it is always visible in english irrespective of the language like 1 sep, 20 sep, 10 oct, 30 oct, 20 nov .

Please help.

Vikas Ahuja

0 votes

Hello, I have tried to see if it is possible to show the rollover without showing any labels so that is is just a vertical bar. I was searching on StackOverflow and a few answers said it was not possible to omit any of the values from the graph. I did see that we can customize the cursor, is it possible to just have it be a vertical bar instead of a cross?? Then I could just use it instead of the default rollover.

I am linking a mockup we made of what we want to make. In the image, you have the graphic showing where the use as pressed, and above the graphic, we will show and update a graphic with the relevant information for that point.

Also, I will need to programmatically dismiss it so it will need to stay visible even if the user is panning or zooming.

0 votes

See the screen shot (attached)

To dupe this start on the SciChart home page, select documentation, select iOS, then enter anything into the search box.

I get the same results with Chrome and Safari.

0 votes

iOS 13.5
Xcode 10.15.5

If I am using the API incorrectly please let me know. I am not aware of any requirement to wait after using the SciChart API.

It appears the SCILegendModifier has some kind of timing bug. If you draw a chart on a surface with a legend, then clear the chart, then add another plot to the same surface you will notice the legend has stale data. However, if you clear the surface and wait a second before you add the new plot it will work as expected.

I created a sample Xcode project to demonstrate the issue. See the attachment

I also created a video to demonstrate the issue:

I have a workaround so this is not urgent, but I would like to remove the delay for my production release.

0 votes

I’m tested on iPhone 8 (iOS 13.5.1) and iPad (iPadOS 13.5.1). On iPad the graph always works great but on iPhone sooner or later it always fails.

The exception is always “Thread 1: EXC_BAD_ACCESS (code=1, address=0x11d927ffc)” in the application main:

int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); <–

in the task stack:

0x103b530e0 <+0>:  ldr    x8, [x0, #0x8]
  0x103b530e4 <+4>:  ldr    w8, [x8, w1, sxtw #2]   <--
0x103b530e8 <+8>:  scvtf  d0, w8
0x103b530ec <+12>: ret

The truth is, I have no idea what’s going on. .. Please, anyone know what might be happening?

Thank you very much!

Due to the app upgrade, the code is in objective-c. This is my initialization code:

- (void) loadSciChartSurface:(SCIChartSurface*)surface {
sciChartSurface = surface;
sciChartSurface.translatesAutoresizingMaskIntoConstraints = true;

// scroll
SCIZoomPanModifier *zoomPan = [SCIZoomPanModifier new];
zoomPan.receiveHandledEvents = true;
zoomPan.zoomExtentsY = false;
zoomPan.direction = SCIDirection2D_XDirection;
[sciChartSurface.chartModifiers add:zoomPan];

// zoom
SCIPinchZoomModifier *pinchZoomModifier = [SCIPinchZoomModifier new];
pinchZoomModifier.direction = SCIDirection2D_XDirection;
pinchZoomModifier.scaleFactor = 1.5;
[sciChartSurface.chartModifiers add:pinchZoomModifier];

// series
rSeries = [SCIFastLineRenderableSeries new];
xAxis = [SCINumericAxis new];
yAxis = [SCINumericAxis new];

xAxis.visibleRangeChangeListener = ^(id<ISCIAxis> axis, id<ISCIRange> oldRange, id<ISCIRange> newRange, BOOL isAnimating) {

    int min = newRange.minAsDouble;
    int max = newRange.maxAsDouble;
    int center = (min + max) / 2;

    if (center <= 0) {
        axis.visibleRange.min = @(0.0 - xHalfWidth);
        axis.visibleRange.max = @(xWidth - xHalfWidth);
    } else if (center >= dataSamples) {
        axis.visibleRange.min = @(dataSamples - xHalfWidth);
        axis.visibleRange.max = @(dataSamples + xHalfWidth);
    } else {
        // xWith is updated to keep the zoom factor in limits, when (center <= 0) or (center >= dataSamples)
        xWidth = max - min;
        xHalfWidth = xWidth / 2;

[SCIUpdateSuspender usingWithSuspendable:sciChartSurface withBlock:^{
    [sciChartSurface.xAxes add:xAxis];
    [sciChartSurface.yAxes add:yAxis];
    [sciChartSurface.renderableSeries add:rSeries];
    [SCIAnimations sweepSeries:rSeries duration:0.0 andEasingFunction:[SCICubicEase new]];

dataSeries = [[SCIXyDataSeries alloc] initWithXType:SCIDataType_Int yType:SCIDataType_Short];

// x
xWidth = theFileFormat.mSampleRate * MIN_SECONDS_IN_GRID * 1;
xIndex = 0;
xHalfWidth = xWidth / 2;
xAxis.visibleRange = [[SCIDoubleRange alloc] initWithMin:0.0 max:xWidth];

// y
yAxis.visibleRange = [[SCIDoubleRange alloc] initWithMin:SHRT_MIN max:SHRT_MAX];

[self loadDefaultStyle];


0 votes

I’m trying to clear a SCIUniformHeatmapDataSeries after connecting it to a SCIChartSurface, but it is very slow and energy consuming. However, if I clear the data series before it is connected to the sci chart, then the clearing is pretty fast. How can I clear the data series after it is connected to the chart surface quickly? Do I have to make a new data series, clear it, and connect to the scichartsurface every time I want to clear a data series? This is for iOS by the way.
EDIT: code

for i in 0..<data.MATRIX_COLUMNS {
        for j in 0..<data.MATRIX_ROWS  {
            data.ecm2DMatrix[i][j] = Double.nan
            SCIUpdateSuspender.usingWith(charts.ecmSurface) {
      [i][j], atX: i, y: j)
0 votes

I would like to change the color of chart legend, but have failed to find information on how can I do this for iOS. Any sort of tutorial would be highly appreciated.

Worst case scenario would be to create a custom theme that is based on Bright Spark theme and update legend parameters there, but for this I would need to know what exactly does Bright Spark theme looks like.

Looking forward to any recommendations.

Best Regards,

0 votes

Hi guys,

I’m currently evaluating SciChart on iOS using Swift. It seems to have an excellent level of customisation and is almost a drop-in fit for what were are looking for.

I’m creating a timeline chart of candlesticks which the user can pan through. However while the zooming of the Y axis keeps the candles nicely in frame, the zoom snaps into place instantly as the pan happens which is very disorienting. Searching the docs, I cannot see a way to cause a smooth animation as the chart automatically zooms in and out.

This is probably the only thing that we really need to do to make this product work for us so hopefully there is an answer to solve this for us!

Thanks in advance!

0 votes


We have an app where we need to specify a different width for each column. I have attached an image of the result we want. We are currently using “SCIFastColumnRenderableSeries” for the diagram, but all columns have a fixed width and I couldn’t find any way to modify it.

Do you have any suggestions how to accomplish this?


0 votes

When I create a SCIChartSurface programmatically, following the Quick Start guide:

Functionally everything works as expected, but I see a series of these messages in the log:

   [CAMetalLayer nextDrawable] returning nil because allocation failed.

I do not see these messages when the SCIChartSurface is instantiated via a storyboard.

0 votes

I am using an SCINumericAxis for my y-axis. I am setting the visibleRange to (Min = 28, Max = 76). I am leaving the minorsPerMajor to the default of 5. However when looking at my graph (attached) you can see that the major tick labels are actually every 6 minors, e.g. 30, 36, 42, etc. when they should be 30, 35, 40, etc for minorsPerMajor set to 5.

Please advise on how to fix this issue as my major tick labels should be every 5, not every 6.

  • Brad Taber asked 6 months ago
  • last active 4 months ago
0 votes

I have followed the example at: for creating a legend with a custom item.

The initial problem I am trying to solve is that the default legend has a black background but my chart is white. If I set the background of the legend to white, this is a problem because the series text is white, so you can’t read it any longer. Therefore in order to have a legend with a white background to match my chart, I needed custom legend items to be able to set the series text color to black.

I have created my ChartLegendCell.swift file based on the example and my ChartLegendCell.xib which has a UIView and a UILabel. I incorporate these into my code exactly as in the example. However the legend does not show up upon render. I added a breakpoint inside the ChartLegendCell.swift class and I see bindSeriesInfo method called twice per series. What I noticed is that the first time it is called, printing out self.bounds shows (0,0,230,35) which is correct, but the second time it is called self.bounds is (0,0,0,0).

Is there more code which needs to be added in the ChartLegendCell.swift to make sure the width and height aren’t 0?

  • Brad Taber asked 6 months ago
  • last active 4 months ago
1 vote

Hello, I’m having an issue when I put multiple surfaces in an iOS view. Only the one made first is shown and there is a black space in place of the other. I swapped the order of creation and now the other is visible instead. Does anyone know why this is happening or have suggestions for putting multiple surfaces in an iOS view? Thanks

0 votes

Hello, I’ve been trying to create a SCIUniformHeatMap, but I only get a blank, black screen.
Can anyone recommend why colors and the graph aren’t showing up? Thanks

var ecmSurface: SCIChartSurface = SCIChartSurface()
var ecmDataSeries = SCIUniformHeatmapDataSeries(xType: .double, yType: .double, zType: .double, xSize: ReviewModeData.MATRIX_COLUMNS, ySize:ReviewModeData.MATRIX_ROWS)
var heatmapRenderableSeries: SCIFastUniformHeatmapRenderableSeries = SCIFastUniformHeatmapRenderableSeries()
private let countColors = 6
private var colorRGBArray: [UIColor] = [
UIColor(red: 0.0/255.0, green: 0.0/255.0, blue: 131.0/255.0, alpha: 1),
UIColor(red: 0.0/255.0, green: 0.0/255.0, blue: 255.0/255.0, alpha: 1),
UIColor(red: 0.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: 1),
UIColor(red: 255.0/255.0, green: 255.0/255.0, blue: 0.0/255.0, alpha: 1),
UIColor(red: 255.0/255.0, green: 0.0/255.0, blue: 0.0/255.0, alpha: 1),
UIColor(red: 128.0/255.0, green: 0.0/255.0, blue: 0.0/255.0, alpha: 1)
for i in 0..<ReviewModeData.MATRIX_COLUMNS {
for j in 0 ..< ReviewModeData.MATRIX_ROWS {
ecmDataSeries.update(z: ecm2DMatrix[i][j], atX: i, y: j)
var colorZValueArray: [Double] = determineColorMapValues(clim1: 0, clim2: 1);
var colorMap = SCIColorMap(colors: colorRGBArray, andStops: colorZValueArray as [NSNumber])

//configure ECM heatmap
heatmapRenderableSeries.minimum = ReviewModeData.ECM_CLIM1
heatmapRenderableSeries.maximum = ReviewModeData.ECM_CLIM2
heatmapRenderableSeries.dataSeries = ecmDataSeries
heatmapRenderableSeries.colorMap = colorMap!

0 votes


There is a strange displaying behavior of custom annotation. I added custom annotation using the code below.

let imageView = UIImageView(image: UIImage(named: imageName))
imageView.frame = CGRect(origin: .zero, size: CGSize(width: 10, height: 10))

let customAnnotation = SCICustomAnnotation()
customAnnotation.customView = imageView
customAnnotation.verticalAnchorPoint = .bottom
customAnnotation.horizontalAnchorPoint = .center
customAnnotation.set(x1: xCoordinate)
customAnnotation.set(y1: yCoordinate)
sciChartSurface?.annotations.add(items: customAnnotation)

The result looks good, but when I move surface left and right, custom annotation would go outside of bounds. Like the image I uploaded.

Please help me solve the issue.


0 votes

I am trying to add a legend to my chart similar to how is done in the LegendChartView.swift code in the sample app. However the legend does not show and I get several NSLayoutConstraints conflicts such as this one:

[LayoutConstraints] Unable to simultaneously satisfy constraints.   Probably at least one of the constraints in the following list is one you don't want.   Try this:       (1) look at each constraint and try to figure out which you don't expect;       (2) find the code that added the unwanted constraint or constraints and fix it.  (
    "<NSLayoutConstraint:0x283528af0 UIButton:0x13c52d840.height == 25   (active)>",
    "<NSLayoutConstraint:0x2835285f0 UIButton:0x13c52d840.bottom == UIView:0x13c545060.bottom - 4   (active)>",
    "<NSLayoutConstraint:0x2835285a0 V:|-(4)-[UIButton:0x13c52d840]   (active, names: '|':UIView:0x13c545060 )>",
    "<NSLayoutConstraint:0x283528b40 'UIIBSystemGenerated' ==   (active)>",
    "<NSLayoutConstraint:0x283528b90 'UIIBSystemGenerated' V:[UIView:0x13c545060]-(0)-|   (active, names: '|':SCIDefaultLegendItem:0x13c543f90 )>",
    "<NSLayoutConstraint:0x283529c20 'UIView-Encapsulated-Layout-Height' SCIDefaultLegendItem:0x13c543f90.height == 0   (active)>" )

Will attempt to recover by breaking constraint  <NSLayoutConstraint:0x283528af0 UIButton:0x13c52d840.height == 25   (active)>

The internal SCIDefaultLegendItems look to keep setting their width and height to 0 which causes conflicts with the underlying UIButton and UILabel components.

Any thoughts on how to get around this? My chart has four series. I have seen the article on drawing the legend outside the chart surface area however I do not want to do that.

Thank you!

  • Brad Taber asked 6 months ago
  • last active 6 months ago
0 votes

I have a question about the font of the label text. When the screen is captured and enlarged, the character has an outline border. Is there a way to get rid of this border? Japanese Kanji font is used.
Thank you.

var yAxisLeft = new SCINumericAxis();
yAxisLeft.AxisTitle = syAxLeft;
yAxisLeft.AxisId = "Primary Y-Axis";
yAxisLeft.AxisAlignment = SCIAxisAlignment.Left;
yAxisLeft.TitleStyle = new SCIFontStyle(14, UIColor.Green);
yAxisLeft.TickLabelStyle = new SCIFontStyle(14, UIColor.Green);
yAxisLeft.DrawMajorBands = false;
yAxisLeft.DrawMinorGridLines = false;
0 votes

When I add CursorModifier programmatically on long tap I have to remove my finger from screen and press it again In order to CursorModifier become visible

Is it possible to do the following?

1) scroll chart horizontally

2) long tap on screen

3) add CursorModifier programmatically and show it immediately

4) move CursorModifier(finger is still touching the screen)

5) remove finger from screen and remove CursorModifier so I can scroll again

Thank you for reply in advance!

  • Dok God asked 7 months ago
  • last active 6 months ago
0 votes


Would it be possible to receive some information on how to take the legend outside of the chart surface area? We are having an issue when the user selects more axis’ to be shown in the chart. The chart then shrinks horizontally making the legend difficult to access for removing the axis’.

A quick how to with some code example would be highly appreciated. To further highlight, this is Xamarin.iOS project we are talking about.

Thank you and have a nice day.

Best Regards

0 votes

Hello everyone.
We are trying to migrate to V3 in our iOS project and we have many issues.
One of the most important is the implementation of vertically-draggable horizontal lines.
I have a nice working code for SCICharts V2 but I cannot find any similar example of how we can implement a custom modifier for moving an SCIHorizontalLineAnnotation vertically in V3.
We have done it already with the V2 but now that we have to migrate to V3 there is a huge missing part in your documentation.
Our code was using-overiding onPanGesture() in order to figure out if the modifier should handle the touching event, then we were using the touch point in order to find the closer horizontal lines and choose the closest one in order to change the vertical value depending on the touching-changing point.
The only similar example that I found in your documentation ( is using SCIGestureModifier which is not accesible by the V3.
I am trying to use your SCIChartModifierBase class but cannot find anywhere a similar example of what we need.
I already tried to understand how you want us to use the ” override func onEvent(_ args: SCIModifierEventArgs!) ” function of the
SCIChartModifierBase but still no luck, it is impossible to figure out without any kind of a similar example.
The reason of needing an example is that this task needs much more information like these:
1. How to decide if the modifier should handle the touch event and how it should be ignored or handled by the next modifier in the same group ?
2. How to handle the touch started, changed, cancelled events ?
3. How to say in realtime to other modifiers in the same group that we need to to handle the same event simultaneously with this custom modifier ?
4. How to say to the group of modifiers that after the first modifer is taken the touch event then the rest should not use it ?

I will paste here our current implementation that we have done for V2 and needs to be transformed to V3 in case you need more details.

An important part is how we add the modifiers on the chart and this is how we are doing it right now:
let zoom = SCIPinchZoomModifier()
zoom.direction = .xDirection
let group = SCIChartModifierCollection(collection: [CustomModifier(chart: self),
//group.handleGestureFirstOnly = true // Not existing in V3 anymore ! How should we do it in V3 ?
chart.chartModifiers = group

I believe that this code will be really useful for many people out there even for V2 or for migrating to V3.

Swift iOs code using SCICharts V2:

class Modifier: SCIGestureModifier {
private weak var control: ChartView?
private var editingProperty: ChartView.BindableProperty?
private var calculator: SCICoordinateCalculatorProtocol?

    init(chart: ChartView?) {
        self.control = chart

    override func onPanGesture(_ gesture: UIPanGestureRecognizer?, at view: UIView?) -> Bool {

        guard let chart = view as? SCIChartSurface,
            let gesture_ = gesture
            else { return super.onPanGesture(gesture, at: view) }

        let location = gesture_.location(in: chart)
        switch gesture_.state {
        case .began:
            control?.sendActions(for: .touchDown)
            editingProperty = testForDraggableLine(location: location, in: chart)
            calculator = yAxis().getCurrentCoordinateCalculator()
            if editingProperty != nil {
                // Annotations on SciChart don't have Zindex and we want current line to be on the top
                let draggableLines = control?.chart.annotations.array.compactMap { $0 as? DraggableLine }
                if let myLine = draggableLines?.first(where: { $0.bindingKeyValue == editingProperty }) {
                control?.isTouchingLine(isTouching: editingProperty != nil)
            return editingProperty != nil
        case .changed:
            if editingProperty != nil {
                handleDraggingLines(location: location, in: chart)
                return true
        case UIGestureRecognizer.State.ended:
            if editingProperty != nil {
                control?.sendActions(for: .editingDidEnd)
                editingProperty = nil
                _ = control?.adjustYRange(force: true)
                control?.sendActions(for: .valueChanged)
                return true
        case UIGestureRecognizer.State.cancelled:
            if editingProperty != nil {
                control?.sendActions(for: .editingDidEnd)
                editingProperty = nil
                _ = control?.adjustYRange(force: true)
                control?.sendActions(for: .valueChanged)
                return true

        return false

    private func handleDraggingLines(location: CGPoint, in chart: SCIChartSurface) {
        guard let renderSurface = chart.renderSurface,
            let yCalculator = self.calculator,
            let editingProperty = editingProperty else { return }

        let pointInChart = renderSurface.point(inChartFrame: location)
        let valueForYAxis = yCalculator.getDataValue(from: Double(pointInChart.y))
        control?.setValue(Decimal(valueForYAxis), forKey: editingProperty.rawValue)

    // SOS: Filter possible properties that can be returned. We want to always avoid return - and then - dragging the current price bid or ask !
    private func testForDraggableLine(location: CGPoint, in chart: SCIChartSurface) -> ChartView.BindableProperty? {
        let hitTestDistance: Double = 30 // Pixels !
        let nearItems = chart.annotations.array
            .compactMap { $0 as? DraggableLine }
            .filter { item in
                return item.bindingKeyValue != ChartView.BindableProperty.ask &&
                    item.bindingKeyValue != &&
                    !item.isHidden &&
                    item.yDistance(from: location) <= hitTestDistance
        return nearItems
            .sorted { $0.yDistance(from: location) < $1.yDistance(from: location) }
  • Dxat asked 7 months ago
  • last active 6 months ago
1 vote

We are having an issue which is preventing us from upgrading to a newer version of Xamarin iOS SciChart.

With Xamarin iOS SciChart v3, the UpdateTicks method from SCINumericTickProvider cannot be overridden, because it doesn’t exist (at least not public).

In Xamarin Android SciChart v3, it works with overriding the UpdateTicks method.

In Xamarin iOS SciChart v2, it was possible to customize the ticks by overriding the method GetMajorTicksFromAxis from the class SCINumericTickProvider.

It looks like the types generation from iOS to Xamarin C# has missed to correctly export the UpdateTicks method as public overridable. (Because the docs say it should be there and it is there on Android Xamarin.)

  • Jens Stolz asked 7 months ago
  • last active 7 months ago
0 votes

When search this forum, I found that we can achieve it by adding point marker. But I am getting this error when trying to add point marker :
‘Operation: setPointMarker: is not avaliable on type: SCIHorizontallyStackedColumnsCollection’

let me know this feature(round top corners of bars) is availble or not ! Or is there any way to do this ?

0 votes

If we set ClipMode.None we can pan infinitely to the uncharted space of left and right. this is fine.
But I want to do panning infinitely only to the left side. So I set ‘clipAtMax’. This is stop panning at right. But instead of panning infinity to the left, it is stretching the left part.
Any solution ?

0 votes

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 7 months ago
  • last active 7 months ago
1 vote

iPhone 6, OS 12.4.3., X-axis, Y-axis texts are shown in inverted text. We can see this issue if we download the AppStore version of SciChart app

1 vote

Stacked Bar chat: If we give 0 values, there are Black lines showing at middle of screen. please see attached screen.

1 vote

We are using stacked bar chart, and showing only 6 bars visible at a time.
In the X-Axis, the month labels are missing for alternate months & only displays all month label as a flash when graph is being scrolled. Is there any way to fix this.

0 votes

We need to generate adhoc ipa file for review purpose and we are using the trial version, but its fails. Can you help us on the same?

0 votes

How can we restrict stacked graph chart scrolling to future date ?

1 vote

On clicking any where on stacked bar chart it shows the x axis value. How can we disable the highlight ?

0 votes

I’ve received this crash report for a long time since I use this SDK.
But now it’s the largest amount of crash report in the newest version.
Do you have any idea about this?
I use the SDK to show meter temperature and humidity data. It’s about 10k to 30k data show in the chart and every time the user has download the data or the user zoom, drag the chart will recalculate the min, max, avg number in the visible time range.
Thank you~

  • Switch Bot asked 8 months ago
  • last active 8 months ago
0 votes

After upgraded SciChart to SciChart_iOS_SDK_3.0.0.5074, using rollover modifier on a SciChart surface which was embedded into a scroll view will crash the app. It crashed when user scroll horizontally on a SciChart surface inside a horizontal scrollable scrollview. It is the same with the vertically scrollable scrollview.

2020-03-09 10:14:15.489302+0800 ******[4835:62890] -[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x60000ba28500

2020-03-09 10:14:15.503967+0800 *******[4835:62890] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x60000ba28500’
*** First throw call stack:
0 CoreFoundation 0x00007fff23c7127e exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c91fd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23c75c4c
forwarding + 1436
4 CoreFoundation 0x00007fff23c77f78 _CF_forwarding_prep_0 + 120
5 SciChart 0x000000011139aaba -[SCITouchModifierBase onEvent:] + 186
6 SciChart 0x000000011135dfd8 +[SCIEventManager raiseOnEvent:toTarget:isMaster:] + 267
7 SciChart 0x000000011132d03f __38-[SCIEventDispatcher p_SCI_commonInit]_block_invoke + 165
8 SciChart 0x000000011132d45d -[SCIEventDispatcher raiseOnEvent:withAction:] + 569
9 SciChart 0x000000011133fa94 -[SCIChartSurfaceBase p_SCI_onTouchEvent:] + 233
10 SciChart 0x000000011133f996 -[SCIChartSurfaceBase touchesCancelled:withEvent:] + 209
11 UIKitCore 0x00007fff480bf863 forwardTouchMethod + 340
12 UIKitCore 0x00007fff480bf974 -[UIResponder touchesCancelled:withEvent:] + 49
13 UIKitCore 0x00007fff480bf863 forwardTouchMethod + 340
14 UIKitCore 0x00007fff480bf974 -[UIResponder touchesCancelled:withEvent:] + 49
15 UIKitCore 0x00007fff480a4a43 __106-[UIApplication _cancelViewProcessingOfTouchesOrPresses:withEvent:sendingCancelToViewsOfTouchesOrPresses:]_block_invoke + 609
16 UIKitCore 0x00007fff480a429e -[UIApplication _cancelTouchesOrPresses:withEvent:includingGestures:notificationBlock:] + 1163
17 UIKitCore 0x00007fff480a47ac -[UIApplication _cancelViewProcessingOfTouchesOrPresses:withEvent:sendingCancelToViewsOfTouchesOrPresses:] + 158
18 UIKitCore 0x00007fff47c37f2f -[UIGestureEnvironment _cancelTouches:event:] + 707
19 UIKitCore 0x00007fff47c40115 -[UIGestureRecognizer _updateGestureForActiveEvents] + 1779
20 UIKitCore 0x00007fff47c31eda _UIGestureEnvironmentUpdate + 2706
21 UIKitCore 0x00007fff47c3140a -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 467
22 UIKitCore 0x00007fff47c3117f -[UIGestureEnvironment _updateForEvent:window:] + 200
23 UIKitCore 0x00007fff480d04b0 -[UIWindow sendEvent:] + 4574
24 UIKitCore 0x00007fff480ab53b -[UIApplication sendEvent:] + 356
25 UIKit 0x0000000114ad2bd4 -[UIApplicationAccessibility sendEvent:] + 85
26 UIKitCore 0x00007fff4812c71a __dispatchPreprocessedEventFromEventQueue + 6847
27 UIKitCore 0x00007fff4812f1e0 __handleEventQueueInternal + 5980
28 CoreFoundation 0x00007fff23bd4471 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
29 CoreFoundation 0x00007fff23bd439c __CFRunLoopDoSource0 + 76
30 CoreFoundation 0x00007fff23bd3b74 __CFRunLoopDoSources0 + 180
31 CoreFoundation 0x00007fff23bce87f __CFRunLoopRun + 1263
32 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
33 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
34 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
35 ****** 0x000000010b51505f main + 143
36 libdyld.dylib 0x00007fff5227ec25 start + 1
37 ??? 0x0000000000000001 0x0 + 1

  • Gary Chan asked 8 months ago
  • last active 8 months ago
0 votes


I am using SciChart_iOS_SDK_3.0.0.5074 with Swift 5.

I want to show string type on X-axis. I am using below code snippet.

class YearsLabelProvider: SCILabelProviderBase<SCINumericAxis> {

   var xLabels: [String] = ["Test", "Test", "Test", "Test", "Test", "Test", "Test", "Test",     "Test", "Test", "Test", "Test", "Test", "Test"]

   func update(_ axis: ISCIAxisCore!) { }

   override func formatLabel(_ dataValue: ISCIComparable!) -> ISCIString! {
        let index = Int(dataValue.toDouble())
        return NSString(string: index >= 0 && index < xLabels.count ? xLabels[index] : "")

    override func formatCursorLabel(_ dataValue: ISCIComparable!) -> ISCIString! {
        let index = Int(dataValue.toDouble())

        var result: String?

        if (index >= 0 && index < xLabels.count) {
            result = xLabels[index]
        return NSString(string: result!)

Application crashes while loading with the following error –

” *** Terminating app due to uncaught exception ‘Initializer not allowed Exception’, reason: ‘Parameterless initializer of Chart.YearsLabelProvider class shouldn’t be used. Please use one of the designated initializers instead'”

Kindly help us resolving this issue since this is a showstopper issue.
I would also like to know about what data SCIXyDataSeries accepts when we are working with strings.

0 votes
0 answers


i want to disable the pan effect when user long press on chart and allow the user to scroll only in the currently visible range to view the rollover tooltip so that user can see the reading in the current visible range. Once the long press is release, then enable the pan effect again.

Currently when user try to see the reading using rollover tooltip, the whole chart is moving. I have tried removing and adding the zoompanmodifier on long press gesture in ios. But it is not working.

Thank you in advance.

-1 votes
0 answers

Hi I am using pod ‘SciChart’, ‘3.0.1-nightly.5114’.

Q1)How get selected series instance, index. How to change the color of the selected series.(Using UITapGestureRecognizer and HitTest).

Q2)How to show only Min and Max tick label value of Y Axis. Just want to hide the intermediate tick labels in between Min and Max of Y Axis.

Q3)How to give some spaces at beginning and end of the series in Scichart.

Q4)How to hide the square gray stroke around the Scichart.

0 votes

I’m getting the following crash:

2020-02-14 16:45:43.902812-0500 CommonStock Development[2425:710225] -[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x282ffe080
2020-02-14 16:45:43.904098-0500 CommonStock Development[2425:710225] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x282ffe080’

whenever I try to scrub my chart, I must also note that in order for the legend to show, I have to tap really hard on the surface.

This is my code:

func set(data set: SimpleChartDataSet, alternate: SimpleChartDataSet) {

    let lineDataSeries = SCIXyDataSeries(xType: .double, yType: .double)
    let dashedDataSeries = SCIXyDataSeries(xType: .double, yType: .double)

    let group = DispatchGroup()
    group.enter() .userInteractive).async {
        for (index, i) in set.enumerated() {
            lineDataSeries.append(x: Double(index), y: Double(i))

        for (index, i) in alternate.enumerated() {
            dashedDataSeries.append(x: Double(index), y: Double(i))


    group.notify(queue: .main) {

        let lineSeries = SCIFastMountainRenderableSeries()
        lineSeries.zeroLineY = set.min() ?? 0.0
        lineSeries.dataSeries = lineDataSeries
        lineSeries.strokeStyle = SCISolidPenStyle(color:, thickness: 2.0)
        lineSeries.areaStyle =  SCILinearGradientBrushStyle(start: CGPoint(x: 0, y: 1), end: CGPoint(x: 0, y: 0), start:, end: UIColor.clear)

        let dashedSeries = SCIFastLineRenderableSeries()
        dashedSeries.zeroLineY = set.min() ?? 0.0
        dashedSeries.dataSeries = dashedDataSeries
        dashedSeries.strokeStyle = SCISolidPenStyle(color: UIColor.white, thickness: 2.0, strokeDashArray: [2.0,2.0,2.0,2.0])

        SCIUpdateSuspender.usingWith(self.surface) {


            let xAxis = SCINumericAxis()
            xAxis.drawLabels = false
            xAxis.drawMajorBands = false
            xAxis.drawMajorGridLines = false
            xAxis.drawMinorGridLines = false
            xAxis.drawMinorTicks = false
            xAxis.drawMajorTicks = false
            xAxis.drawLabels = false

            let yAxis = SCINumericAxis()
            yAxis.drawLabels = false
            yAxis.drawMajorBands = false
            yAxis.drawMajorGridLines = false
            yAxis.drawMinorGridLines = false
            yAxis.drawMinorTicks = false
            yAxis.drawMajorTicks = false
            yAxis.drawLabels = false

            self.surface.xAxes.add(items: xAxis)
            self.surface.yAxes.add(items: yAxis)
            self.surface.renderableSeries.add(items: lineSeries, dashedSeries )
Showing 1 - 50 of 237 results