Pre loader

Category: iOS

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
5k views

Hi,

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

Hey all,

is there a way on iOS to export a SciChartSurface to a vector format in order to embed the exported chart into a PDF document? Right now the only thing I can find in the Documentation is exportToUIImage(). If not – any ideas for a workaround until such feature is implemented?

0 votes
0 answers
6k views

Hi,

I have two question on iOS Chart.

1.How can I customize the display value for tooltip generated by SCICursorModifier? I would like to set the following:

15/06/2017
O: 99.35
H: 99.35
L: 98.30
C: 98.75

The text color of OHLC value should be set according to prev. close value.

2.The function setVisibleRange is working for SCIDateTimeAxis but not SCICategoryDateTimeAxis
Here is the initialization of the axis:

id axis = [[SCICategoryDateTimeAxis alloc] init];
axis.axisId = @”X1″;
[axis setAutoRange:SCIAutoRange_Never];
[axis setVisibleRangeLimitMode:SCIRangeClipMode_MinMax];
[surface.yAxes add:axis];

Set the visible range after receiving the data

SCICategoryDateTimeAxis *xAxis = (SCICategoryDateTimeAxis *)[[surface xAxes] getAxisById:@”X1″];
[xAxis setVisibleRange:[[SCIDateRange alloc] initWithDateMin: Max:]];`

I tried to replace the axis type from SCICategoryDateTimeAxis to SCIDateTimeAxis, it works well. Any idea about this?

1 vote
1k views

Hi. I’m currently working with sci chart iOS.

I create a custom crosshair modifier and get satisfactory results for most movements.

That crosshair by referring to your finance app, and one problem is that when the finger dragging the crosshair moves to the axis surface area, the crosshair movement stops.

It is true that the crosshair is only drawn on the chart surface, but I think I should continue to receive events even if it crosses the axis surface while dragging. How do I do that?


And another Q2. how to pause crosshair dragging event?

When I have multiple chart(vertical group), If I turn on crosshair and I start resizing dragging, crosshair is update according to dragging.

I hope just stop crosshair, but visible state. How can I do that?

  • jay han asked 3 months ago
  • last active 3 months ago
1 vote
5k views

Hi,

i am Swift Language

=>Senario
i am plotting live ECG Data on SciChart Surface. I have added 9 Graph on Storyboard in a UIScrollView for the Following things
-ECGI
-ECGII
-ECGaVL
-ECGV
-ECGIII
-ECGaVF
-ECGaVR
-Pleth
-RESP
Each of the above has data = [Int]
i had written a custom Class for Plotting Live Data

=>Class Specification
Inherited From UIView in a seperate xib which contains
– A Label For Name of the chart,
– A chart to draw data and a label
– for displaying frame buffer speed

=>Requirement a Single Chart (Chart have no modifier added onit)

=> ISSUE
Everything Works Fine until the scroll start, On Scrolling The chart stop Plotting Data Until the Scroll stops

  • Atiq Tahir asked 5 years ago
  • last active 4 years ago
0 votes
9k views

Hi,

I’m trying to limit the x-axis panning up to an annotation that I’ve drawn on the graph. This annotation can be beyond the current data’s position (i.e. data’s timestamp is at 5/4/2017 11:00:00, annotation’s position is at 5/4/2017 16:00:00). Is there a method, or any way that I can use to limit the x-axis panning up to the annotation’s position instead of limiting it to the data series’ max X?

Regards.

1 vote
0 answers
8k views

Hi All,

I’ve been trying to get SciCharts and the IOS UIScrollview to work together and have been running into a couple of issues.

The main storyboard has 7 SciChart surfaces plotting realtime data embedded inside a single UI scrollview controller.

1) Charts don’t render when scrollview is actively scrolling

Everything works fine during normal operation and we don’t try to scroll.

Once a finger is placed on the screen, the SciCharts surface stops redrawing. This could be due to the fact that the ‘Scroll’ thread is handled in the UITouch thread and perhaps has higher priority. I don’t know if there is anyway to change the priority of the render routine. I can confirm that everything until ‘Update Data’ and Chart.InvalidateElement() is being called during a scroll action.

2) Scrolling is disallowed when Chart surface is as large as scrollview

This may not be exactly due to scichart but if anyone faced this problem before it would help. If you attempt to scroll when the SciChartSurface is as large as the parent UIScrollView, it doesn’t scroll. Almost like the SciChart surface has the priority of touch and doesn’t let the scroll view see the scroll.

I would greatly appreciate if anyone successfully got UIScrollview and Scicharts working well together. I might be doing a bunch of rookie mistakes.

Cheers,
Mithrandir

Adding a quick update,

I could fix (2) by disable User Interactions of the Chart.

Note that you can’t simply disable this in the Main Storyboard, this has to be done programmatically by calling

ChartName.isUserInteractionEnabled = false

So the only real issue is (1), getting the chart to render while scrollview is active.

0 votes
4k views

Hi guys,

Is it possible to capture the tap event when we tap on a point marker or a data point? I can see there’s a DataPointSelectionModifier for WPF, but there’s nothing for iOS. Our goal is to show a popup (tooltip) on the point marker when the user taps on it.

Thanks,
Lazar Nikolov

0 votes
7k views

When i try to run the simple Example from the Documentation ( with my trial License Key ) :

class AppDelegate: NSResponder, NSApplicationDelegate {
override init(){
// Set this code once in AppDelegate or application startup
SCIChartSurface.setRuntimeLicenseKey(“XXXXXX”);
super.init()

}

i receive this error and the application builds but fails to start :

libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception ‘License Exception’, reason: ”
terminating with uncaught exception of type NSException

0 votes
9k views

Hello!

I am building an iOS framework that sits on top of SciChart for app developers within our company. I’d like to provide my own default SCIThemeColorProvider object for charts in my framework. Easiest way to do that is to include my own theme plist in my framework’s bundle, but I cannot currently do that (as of 2.0.0.1643) because the SCIThemeColorProvider initializer assumes it’s either in the “Charting.SciChart” bundle or the main bundle.

I’d like to propose modifying SCIThemeColorProvider to add another initializer that takes a bundle ID, like this:

/**
 * Creates theme provider based on specified style
 *
 * @param themeKey The key of style which should be used as base for this theme provider
 *
 * @param bundleIdentifier The identifier of the bundle containing the theme plist identified by 
 *                         themeKey; if nil, the main bundle is used.
 */
- (nullable instancetype)initWithThemeKey:(nonnull NSString*)themeKey bundleIdentifier:(nullable NSString*)bundleIdentifier;

The existing -initWithThemeKey: initializer would call through to this initializer with a nil bundle ID.

I have attached a patch file with this proposed change. Could this be added to an upcoming build?

4 votes
15k views

I will continue to this question here, but with more details. So I need to be able to drag axis annotations separately. Is there any possible way to achieve this in iOS? Basically I subclassed SCIAxisMarkerAnnotation and implemented my own -onPanGesture:At: but it does not separate instances of the class when I try to drag one of the annoation. All moves to same place. How can I detect which annotation is being dragged?

CDAxisMarkerAnnotation.h

#import <SciChart/SciChart.h>
@class CDAxisMarkerAnnotation;

@protocol CDAxisMarkerAnnotationDelegate <NSObject>

- (void)axisMarkerAnnotation:(CDAxisMarkerAnnotation *)axisMarkerAnnotation
           didPanToAxisValue:(double)axisValue;

@end

@interface CDAxisMarkerAnnotation : SCIAxisMarkerAnnotation

@property (weak, nonatomic) id<CDAxisMarkerAnnotationDelegate> delegate;

@end

CDAxisMarkerAnnotation.m

#import "CDAxisMarkerAnnotation.h"

@implementation CDAxisMarkerAnnotation

- (BOOL)onPanGesture:(UIPanGestureRecognizer *)gesture At:(UIView *)view
{
    if (![view isKindOfClass:[SCIChartSurfaceView class]]) {
        return [super onPanGesture:gesture At:view];
    }

    switch (gesture.state) {
        case UIGestureRecognizerStateBegan:
        case UIGestureRecognizerStateChanged:
        case UIGestureRecognizerStateEnded: {
            CGPoint location = [gesture locationInView:view];
            id<SCIRenderSurface> renderSurface = [self.parentSurface renderSurface];
            CGPoint pointInChart = [renderSurface pointInChartFrame:location];
            id<SCICoordinateCalculator> yCalculator = [self.yAxis getCurrentCoordinateCalculator];
            double valueForYAxis = [yCalculator getDataValueFrom:pointInChart.y];
            [self.delegate axisMarkerAnnotation:self didPanToAxisValue:valueForYAxis];
            break;
        }
        default: {
            break;
        }
    }
    return YES;
}

@end

Thanks,
Irmak

0 votes
7k views

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' SCIDefaultLegendItem:0x13c543f90.top == UIView:0x13c545060.top   (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 4 years ago
  • last active 4 years ago
1 vote
4k views

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

0 votes
3k views

We’re using Xamarin.Forms. We were using iOS build 5019 and Android build 4441 and we had a custom DatelabelProvider set on our X axis in both platforms which worked fine.

However after updating to latest builds (5022 and 4459), the provider’s FormatLabel (FormatLabelFormatted on Android) isn’t being called and the default label formatting is applied.

0 votes
9k views

Hi, guys

Please take look at:
http://prntscr.com/gmmib5

So my question is

Is there a way to highlight a line of a gridlines to which the label belong? It can be a color changed or something similar that can be easily perceived by the user.

Best regards,
Sushynski Andrei

0 votes
10k views

I am using latest version of SciChart through Pods. I am using trial key for now.

I have made all the views under the chart clear. And have tried the code below but the background appears to be shades of black.

     let yAxis = SCINumericAxis()
     let xAxis = SCINumericAxis()
     self.surface.xAxes.add(xAxis)
     self.surface.yAxes.add(yAxis)

     self.surface.backgroundColor = UIColor.clear
     self.surface.isOpaque = false
     self.surface.renderableSeriesAreaFill = SCISolidBrushStyle(color: UIColor.clear)
     self.surface.renderableSeriesAreaBorder = SCISolidPenStyle(color: UIColor.clear, withThickness: 0)
  • Ayush Jain asked 5 years ago
  • last active 5 years ago
0 votes
4k views

I had recently integrated SciChart into my app, and faced some problems with chat appearance on trial mode which are described here: https://www.scichart.com/questions/ios/issue-with-scichart-on-ios-simulator
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?

1 vote
6k views

How can I format the percentage values in the pie chart segments to omit the decimals? e.g i want it to show 20% instead of 20.00%. The values I pass in are always rounded

1 vote
10k views

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

1 vote
4k views

Hi,

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?

Thanks.

0 votes
0 answers
8k views

Hi,

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

I download the iOS library via cocoapods. Today running ‘pod update’ results in the error below. It seems the ZIP file is not available on the server.

Installing SciChart 4.4.1.5847 (was 4.4.1.5840)
[!] Error installing SciChart
[!] /usr/bin/curl -f -L -o /var/folders/mr/0skn4y5d1t99bcvzd09g_wdr0000gn/T/d20221217-6770-1dkgzs/file.zip https://github.com/ABTSoftware/PodSpecs/releases/download/v4.4.1.5847/SciChart_iOS_4.4.1.5847.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.11.3 cocoapods-downloader/1.6.3'

curl: (22) The requested URL returned error: 404

I tried to download the zip file manually and it failed. When I modified the URL to download the previous release (4.4.1.5840) it worked.

0 votes
6k views
  1. Is it possible to display the peak value instead of X and Y values at touch point using a modifier ? If so, how can I achieve this ? (Both Rollover and Cursor modifier only shows the X and Y values)

  2. In real time chart, since the values are updating continuously, the cursor modifier is constantly disappearing and appearing and is not stationary. How can I keep the cursor modifier always visible ?

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

Hi, guys

What is the minimum required sdk version for SciChart v.2?

Such as i have some trouble with IOS 9. See attachment.

Same behavior at real devices.

Can you look at this?

Best regards,
Sushynski Andrei

0 votes
10k views

So I want to draw multiple charts so is there any way I can have stacked yAxes like yAxis 2 should be drawn below yAxis1. I have gone through your example and there I got that we can add multiple surface but its becoming difficult for us to show a crosshair on all surfaces since we have a custom cross hair. Can you guide on same. Thanks in advance

0 votes
6k views

I’m trying to accomplish 2 things:

First is that I would like to not be able to zoom out past the data, it does no good to zoom out if there is no more data to see. It would also be nice to have a little bounce/spring back if you zoom to far, like when zooming out on an image on an iPhone.

The second is that I only want to be able to pan to the data. If zoomed all the way out, then trying to pan would do nothing. If zoomed in you should be able to scroll around, but only to the end of the data.

I believe I have the first one accomplished by setting the maximalZoomContrain to be the same as the data range, although this doesn’t allow any kind of bounce.

What need to be done to make this work, this seems like a feature that is built into the SciChart Modifiers.

1 vote
5k views

I didn’t see anything in any docs, so I am just wanting to verify this info…

Is this correct that you have to link in and ship the libSwiftCore (+ other swift libs) with an app using SciCharts on iOS? When I added the chart library to my app; the app crashed at startup with missing dynamic load of libSwiftCore.dylib on a real device (emulators run fine).

Enabling ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES in the build settings fixed this issue. But this surprised me that the SciChart library would actually require Swift.

Was this intentional; or did the library somehow pickup an unintentional reference somewhere….

0 votes
4k views

I was able to add multiple y axis and able to fill data on different y axis but the problem is all the y axis are overlapping. What I want is how can I segregate y axes in such a way that they should appear one below the other in the same surface. I tried adding two different surface but then I am not able to add single cursorModifier to both surface. Our android developers had used something called YAxisStackedLayoutStrategy to achieeeve this is there any equivalent class for iOS

0 votes
4k views

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

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
0 answers
4k views

this is crash log just scroll left kline . please tell me how to deal with . (lldb) bt

thread
1 , queue = ‘com.apple.main-thread’, stop reason = EXCBADACCESS (code=1, address=0x0) frame
0 : 0x000000011290beb0 SciChart-[p_SCI_29RJjaaEk0 prs_rB:A:B:D:] + 772 frame 1: 0x000000011290b9f8 SciChart-[pSCI29RJjaaEk0 oexecuteMode:XColumn:YColumn:PointRange:VisibleRange:ViewPortWidth:LastPointSeries:isCategory:] + 684 frame
2 : 0x0000000112962c24 SciChart-[SCIXyDataSeries toPointSeriesWithResamplingMode:SCIIndexRange:ViewportWidth:IsCategoryAxis:VisibleRange:Resampler:] + 332 frame 3: 0x0000000112924420 SciChart+[pSCI29ASj923jdOIJIO29 scrrSWXA52f:A:B:C:D:E:F:] + 792 frame
4 : 0x0000000112923f48 SciChart-[p_SCI_29ASj923jdOIJIO29 scr_prDws:A:] + 1160 frame 5: 0x0000000112922b34 SciChart-[pSCI29ASj923jdOIJIO29 scrrL32e23:] + 212 frame
6 : 0x00000001128c5680 SciChart-[SCIChartSurface onRenderSurfaceDraw] + 220 frame 7: 0x000000011293e39c SciChart-[SCIRenderSurfaceBase onRenderTimeElapsed] + 240 frame
8 : 0x0000000112951240 SciChart-[SCIOpenGLRenderSurface onRenderTimeElapsed] + 192 frame 9: 0x0000000114964254 GPUToolsCore-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 176 frame
10 : 0x0000000187453710 QuartzCoreCA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 672 frame 11: 0x0000000187507c5c QuartzCoredisplaytimercallback(CFMachPort, void, long, void*) + 240 frame
12 : 0x00000001834b4290 CoreFoundation__CFMachPortPerform + 188 frame 13: 0x00000001834cf000 CoreFoundationCFRUNLOOPISCALLINGOUTTOASOURCE1PERFORMFUNCTION_ + 56 frame
14 : 0x00000001834ce704 CoreFoundation__CFRunLoopDoSource1 + 440 frame 15: 0x00000001834cc1d8 CoreFoundation__CFRunLoopRun + 2196 frame
16 : 0x00000001833ebe58 CoreFoundationCFRunLoopRunSpecific + 436 frame 17: 0x0000000185298f84 GraphicsServicesGSEventRunModal + 100 frame
18 : 0x000000018ca6b67c UIKit`UIApplicationMain + 236
frame
19 : 0x00000001034ce07c FXChatmain at AppDelegate.swift:15:20 frame 20: 0x0000000182f0856c libdyld.dylibstart + 4

  • ke zhang asked 5 years ago
  • last active 5 years ago
1 vote
11k views

I’ve got error message during compilation:

 ld: bitcode bundle could not be generated because '.../Frameworks/SciChart.framework/SciChart' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture armv7

I temporary disabled bitcode for target. Will you fix it in the next build?

1 vote
6k views

We have created graph for x axis string and y axis double. we have create object like this XyDataSeries<string,double> if run app getting exception error .

How to declare and how to use it .

0 votes
7k views

When I create a SCIChartSurface programmatically, following the Quick Start guide:
https://www.scichart.com/documentation/ios/current/creating-your-first-scichart-ios-app.html#adding-scichartsurface-purely-from-code

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.

1 vote
4k views

After seeing some strange behavior in my application, I have a simple repro case where hiding a renderable series that’s in a vertically stacked columns collection causes the entire screen to go black. I’ll attach a full viewDidLoad() below, but here’s the basic setup:

    let rsLeftSingle = SCIStackedColumnRenderableSeries()
    rsLeftSingle.dataSeries = dataSeriesLeftSingle
    rsLeftSingle.yAxisId = yAxisLeft.axisId
    rsLeftSingle.fillBrushStyle = SCISolidBrushStyle(color: UIColor.yellow)
    rsLeftSingle.strokeStyle = SCISolidPenStyle(color: UIColor.yellow, thickness: 2.0)

    let rsLeftDouble = SCIStackedColumnRenderableSeries()
    rsLeftDouble.dataSeries = dataSeriesLeftDouble
    rsLeftDouble.yAxisId = yAxisLeft.axisId
    rsLeftDouble.fillBrushStyle = SCISolidBrushStyle(color: UIColor.blue)
    rsLeftDouble.strokeStyle = SCISolidPenStyle(color: UIColor.blue, thickness: 2.0)

    let stacks = SCIVerticallyStackedColumnsCollection()
    stacks.add(rsLeftSingle)
    stacks.add(rsLeftDouble)
    surface.renderableSeries.add(stacks)

    let legendModifier = SCILegendModifier()
    surface.chartModifiers.add(legendModifier)

That code displays a stack of yellow and blue bars, with a legend and checkboxes (both checkboxes selected). When I tap a checkbox to deselect it, the SCIChartSurface() goes blank, the legend remains on screen, and I see this message in the console:

Exception raised with reason: All stacked series in on collection should have the same amount of X Values

When I reselect that checkbox, I get my plot back.

There are no changes being made to the underlying data. Hiding/showing works correctly for horizontally stacked collection and for other renderable series types.

What’s your recommended workaround?

0 votes
9k views

Hi

I am developing a Xamarin iOS application and I’m using a SCIPieChartSurface. I can create the chart and set its values, but it is not possible to auto-update the donut with new data.
I am trying to update the value by doing:

myDonut.MyPieSegment.Value = newValue;

But nothing happends…

1 vote
4k views

SciChart 3.1.0.5175
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 chart.zip

I also created a video to demonstrate the issue: https://youtu.be/1JBTd1sfVgI

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

0 votes
4k views

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 4 years ago
  • last active 4 years ago
0 votes
11k views

Hey guys,

Starting from 2.0 we can have dashed lines in renderable series. I was wondering can we have dashed line annotations as well?

I tried this:

verticalLineAnnotation.style.linePen = [[SCIPenDashed alloc] initWithColor:[UIColor redColor] width:2 withStrokeDashArray:@[@(10.f),@(3.f)]];

and got this build error:

Assigning to 'SCIPenStyle *' from incompatible type 'SCIPenDashed *'

Isn’t SCIPenDashed a SCIPenStyle?

Best,
Igor

  • Igor Peric asked 7 years ago
  • last active 7 years ago
-1 votes
0 answers
4k views

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.

1 vote
5k views

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

We have lots of Point Markers in our series that overlap, so we’re trying to find a way to Cluster them in Android and iOS. I can see that there is an SCIPointMarkerClusterizer. Can you give us some pointers on how we can achieve point marker clustering and/or spacing?

0 votes
4k views

i am Swift Language
let dragmodifier = SCIZoomPanModifier()
dragmodifier.clipModeY = .clipAtExtents

-OR-

How can i acheive this?

  • Atiq Tahir asked 5 years ago
  • last active 4 years ago
-2 votes
0 answers
5k views

I don’t find limit line
How can I implement limit line without using Fast Line series?

0 votes
3k views

I am planning to have a graph like in attached image. Just to have only X values and additional Label provider on it and an indication to point the value like black arrow.
Need your inputs. Thanks in advance.

1 vote
3k views

Hi, I’m looking for a way to programmatically dismiss a RolloverModifier from a chart. I’ve been tasked with creating a user experience that does two things: 1. when a user stops scrubbing on the chart, the rollover modifier should persist, and 2. when the user taps outside of the chart the rollover modifier should disappear.

I’ve accomplished the first part of the problem by implementing a subclass of SCIRolloverModifier and overriding the onEvent(args:) function, but I cannot figure out how to dismiss the rollover modifier when the user taps outside the chart surface.

Is there a way to accomplish this?

1 vote
8k views

Hello

is there a way to set the padding (aka reduce the gap) between bars in a SCIFastColumnRenderableSeries?

I attach a screenshot of my current situation: I would like to have zero margin between columns.

I tried searching in the knowledge base but all the answers I found seem to refer to APIs not available in the iOS SDK

.

There is not such class method in the iOS SDK called SciChartSurface.Padding

Thanks for your help

0 votes
3k views

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:

SciChart`XValuesProviderWrapper<int>::GetDoubleValue:
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];

}

1 vote
4k views

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.

Showing 1 - 50 of 314 results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies