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

My purpose is SCIAxisLabelAnnotation draw above on border line.
like this <– this is just design guide. not a app screenshot.

But SCIAxisLabelAnnotation is can’t overlap renderable series area. So It can’t overlap renderable series area border line.

So I have to customize.
I think that If I add view into render surface, and it’s order make to zero, I can get TOBE result.

My code is below.
Code

But SeparatorView is always on view’s top. So I’m struggling.
You can See result.
It’s covered all surface.

How can I insert some view below Y Axis or SCIAxisLabelAnnotation?

tl;dr I want customize annotation shape and it draw above on 1st top layer.

  • jay han asked 7 hours ago
  • last active 5 hours ago
0 votes
0 answers
2 views

Hello,

I have a problem reading the position of the vertical line annotations. The function “getX1” returns type double (0 – 1) or date depending on whether the annotation has not changed its position. I found out from the documentation that the type returned depends on the coordinateMode. I set it to absolute. This change had no effect, unlike in library written in Java. Is it possible to set the default type? Can I ask for any guidance needed to solve the problem? The version of the library I am using is 4.4.2.5871.

Thanks in advance!
Paweł

1 vote
3k views

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

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

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

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

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

0 votes
10k views

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

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

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

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

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

0 votes
7k views

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

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

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

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

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

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

When i try to add SCITextAnnotation and text color is white, a gray outline appears around the symbol (triangle).
How can I turn it off or change the color?

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

1 vote
2k views

I’m developing chart with sci chart. And I current make candle stick chart.

I want to get correct center coordinate from user’s touch location.

so, I tried this way.

  1. get touch location
  2. get axis data from touch location like this
  3. get coordinate from data

let location = gestureRecognizer.location(in: self) // type is CGPoint
let selectedDate = xAxis.getDataValue(Float(location.x)) // xAxis's type is ISCIAxis
let selectedPoint = xAxis.getCoordinate(selectedData)

If I do that, no matter how far to the right you touch from the center line of the candlestick, you will get the position of the left candlestick.

If the candlestick center line is not crossed, the left data is unconditionally obtained.

I want to get the data closest to the touch, how do I do that?

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

I want to make label on yAxis.
SCIChart provides AxisMarkerAnnotation, but I want to use CustomAnnotation because I need something custom.
So I tried drawing a CustomAnnotation on the yAxis but failed.
Android succeeds in drawing CustomAnnotation on the yAxis using the method below, but iOS doesn’t provide it?
On iOS, Can’t customAnnotation only set the value of the yAxis like AxisMarkerAnnotation?
Android was possible…

error message like this
Exception raised with reason: CALayer position contains NaN: [nan 248.71]. Layer: <CALayer:0x280c10bc0; position = CGPoint (0 0); bounds = CGRect (0 0; 0 0); delegate = <BTChart.CurrentPriceAnnotationView: 0x13d74d8f0; frame = (0 0; 0 0); layer = <CALayer: 0x280c10bc0>>; sublayers = (<_UILabelLayer: 0x282d15860>); opaque = YES; allowsGroupOpacity = YES; >

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 2 months ago
0 votes
3k views

I have a question about an apparent regression/change from v2 to v4.

My chart uses an SCIHorizontallyStackedColumnsCollection with three SCIStackedColumnRenderableSeries instances. One of those is assigned to the right-hand Y axis, and the other two are assigned to the left-hand Y axis. Left and right Y axes have very different ranges.

In v2, each series in the group honored its assigned axis. In v4, each series is using the scale of the left-hand Y axis. This happens regardless of the order I add the renderable series to the columns collection.

In the example below, the magenta, blue, and yellow bars have a range of -2 to 2, and are assigned to the left-hand axis. The green bars have a range of 0 to 30 and are assigned to the right-hand axis. I expect all 4 bars to be displayed using the full vertical range of the chart, but instead everything is using the left-hand axis, and the non-green bars have very little displacement.

This is a change in behavior from v2 to v4. Is it intentional? Is there an easy workaround?

I tried to hack around it by having two different SCIStackedColumnRenderableSeries instances, one with 3 placeholder series/1 real series (RH axis) and the other with 1 placeholder/3 real series (LH axis). That doesn’t help. If there are two different column collections on the chart, they both use the left-hand axis, regardless of the order that they are added.

Minimal repro case is attached. But the crux is at the end. If I comment out the .add(rightStacks) call, I get desired behavior for the stack assigned to the left axis. If I comment out the .add(leftStacks), I get desired behavior for the stack assigned to the right axis. What I want is the chart I’d get by overlaying the second and third screenshots, but with the 0 point of left and right Y axis aligned.

    let rightStacks = SCIHorizontallyStackedColumnsCollection()
    rightStacks.add(rsRightPlaceholder1)
    rightStacks.add(rsRightPlaceholder2)
    rightStacks.add(rsRightPlaceholder3)
    rightStacks.add(rsRight)
    surface.renderableSeries.add(rightStacks)

    let leftStacks = SCIHorizontallyStackedColumnsCollection()
    leftStacks.add(rsLeftSine)
    leftStacks.add(rsLeftSingle)
    leftStacks.add(rsLeftDouble)
    leftStacks.add(rsLeftPlaceholder)
    surface.renderableSeries.add(leftStacks)

Edit

I think I’ve found the cause.

If I manually set (at line 46) yAxisLeft.axisId = “yAxisMyLeft”, then when I render, I get this in the console log:

2021-03-10 16:02:07.993233-0800 SciChart POC[86749:4815412] [WARNING] – [Render Warnings] Could not draw a renderable series of type SCIHorizontallyStackedColumnsCollection. YAxis with Id == DefaultAxisId doesn’t exist. Please ensure that the YAxisId property is set to a valid value.

2021-03-10 16:02:08.509648-0800 SciChart POC[86749:4815412] [WARNING] – [Render Warnings] Could not draw a renderable series of type SCIHorizontallyStackedColumnsCollection. YAxis with Id == DefaultAxisId doesn’t exist. Please ensure that the YAxisId property is set to a valid value.

I conclude from this behavior that SCIHorizontallyStackedColumnsCollection is hardwired to the default axis internally, regardless of the settings of the collection members.

0 votes
0 answers
3k views

Hello,
I’m looking at the iOS “Sync Multi Chart” example that is referenced here:
https://www.scichart.com/documentation/ios/current/tutorial-07—linking-multiple-charts.html

Source code is here:
https://github.com/ABTSoftware/SciChart.iOS.Examples/blob/SciChart_v4_Release/SciChart.Examples/Examples/Examples2D/CreateMultiseriesChart/SyncMultiCharts/SyncMultipleChartsView.swift

When the user does a pinch to zoom gesture the rollover is shown.
When the user does a double tap gesture the rollover is shown.
How do I stop the rollover from showing when pinching to zoom or double tapping to zoom out?
thanks,
Charlie

0 votes
5k views

Hi all,

When we enable the rollover modifier and drag the chart, we can see the tooltip.
However, when I release the finger, the tooltip also disappears.
Is there a way to keep the tooltip showing when releasing the finger?
The problem we want to solve is user will use their finger to mark a critical point, then we will take a screenshot of the chart to generate a report.
Not sure if there is any good way to make the tooltip keeps showing to achieve this requirement?
Thanks

  • DCMA DCMA asked 2 years ago
  • last active 8 months ago
1 vote
3k views

Hi,

I’m using SciChart for macOS (v4.4.2.5871 installed via CocoaPods) and one thing that I tried was to implement the an axis to show full extent of data, as described in the first bullet of https://www.scichart.com/documentation/ios/current/axis-ranging—get-or-set-visiblerange.html#zooming-to-fit-all-the-data

However, what I’m getting is that after setting the visibleRange to match the dataRange, the dataRange no longer reflects the “true” range, but something else. Also “zoom to extent” no longer works

Attached is a super basic example (project) for this. To reproduce, do the following:

  1. Do a zoom (via pinch)
  2. Click the button titled “Set visibleRange to dataRange” -> this step works as expected
  3. Do a zoom
  4. Click again the button -> “zoom to extent” no longer works, dataRange is messed up
  • Vlad Badea asked 8 months ago
  • last active 8 months ago
0 votes
0 answers
2k views

Hi,

I’m using SciChart for macOS (v4.4.2.5871 installed via CocoaPods) and I’m trying to restrict the X axis’ visibleRange as described in https://www.scichart.com/documentation/ios/current/axis-ranging—restricting-visiblerange.html but what I’m getting is the app hanging so badly that even “Pause program execution” doesn’t work (I need to “Stop the running scheme or application”).
The sample code for this issue is super basic and is attached to this ticket, but in a nutshell the lines causing issues are:

xAxis.visibleRangeChangeListener = { axis, oldRange, newRange, _ in
    if newRange.minAsDouble < -10 {
        axis.visibleRange = oldRange
    }
}

The scenario to reproduce the problem is to pan until you hit -10 on X axis.

Let me know if I’m missing something obvious or if this is indeed an issue.

P.S. I have one more problem with setting the visibleRange , but I will open a different ticket because the behavior is different.

  • Vlad Badea asked 8 months ago
  • last active 8 months ago
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
3k views

Greetings! I see you have support Xamarin.iOS and Xamarin.Android, however, I’m not sure about support status: do you support .NET 7 iOS and Android?

1 vote
4k views

I work on a SwiftUI project that has integrated SciCharts.

What I’ve noticed is that while there are SwiftUI examples available, they are rather basic and when I replicate the example code over in my project, it does not run as we expect and in some cases does not run at all.

Currently there seems to be issues with the SwiftUI run loop, SwiftUI’s use of structs, and SciCharts use of pointers that make building complex charts within complex user interfaces rather challenging.

I needed to do a lot of work to get the SwiftUI example code to work in my project, and we’re still facing some challenges. Can we expect better SwiftUI support in the future, such as SwiftUI views included in the SDK or if this work has been done can the documentation be linked?

1 vote
2k views

Hello there,

I am new to SciChart and trying to implement custom SCICursorModifiers tooltip,

It’s almost done, except one issue, i.e I am not able to hide the X axis (or) Horizontal line which is in green colour, it is showing up in the background whenever I am trying to use the tooltip.

The line which needs to be hidden

I tried with following below code but it is not working

extension SCIChartTheme {
    static let berryBlue: SCIChartTheme = SCIChartTheme(rawValue: "SciChart_SciChartv4DarkStyle")
}

SCIThemeManager.addTheme(.berryBlue, from: Bundle.main)

Is there any way to achieve this

Thanks in Advance

1 vote
5k views

I’m try to generate a UIImage from a SCIChartSurface into a graphic context using the code below from a view that is not displayed on the screen. The image created is pure black, which indicates it did not draw. If I display the graph in a view on the devices screen, the graph draws correctly.

UIGraphicsBeginImageContextWithOptions(self.chart.bounds.size, NO, 0.0);
[self.chart drawViewHierarchyInRect:self.chart.bounds afterScreenUpdates:YES];
UIImage *chartImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

Are there any special steps that are needed to draw into a graphic context?

0 votes
7k views

Hi , many of the charts provide a way to set the date on the x axis for the data series and that makes the axis match the DataSeries value defined for that axis, but for heatmap dataseries when you define xType as date the xAxis of type date is not displaying on surface, I don’t know what I’m doing wrong and there is no sample for dates on GitHub , the samples only use int , would be great if you can provide a date sample for the heatmap , thanks

0 votes
3k views

The website has changed recently. I do not see any way to locate my existing support tickets. When I click on Developers–>Support it only gives me the option to create a new ticket.

1 vote
5k views

Hello,

I recently updated 2 different apps that both use SciChart with XCode14 and uploaded the archives to the App Store via Organizer. They both generated the warning/error:

“The app references non-public selectors in …/Frameworks/SciChart.framework/SciChart: moveToX:y:”

This did not occur with Xcode 13.

Any advice on how best to handle this?

Thank you.

  • C Bolton asked 2 years ago
  • last active 1 year ago
1 vote
3k views

I am trying to place a legend outside a Piechart without success. When I create the legend modifier like below everything works as expected:

    let legendModifier = SCIPieChartLegendModifier()
    legendModifier.sourceSeries = renderableSeries
    legendModifier.margins = UIEdgeInsets(top: 17, left: 17, bottom: 17, right: 17)
    legendModifier.position = [.bottom, .centerHorizontal]

However when I try to place it outside like below the app crashes with:
NSInvalidArgumentException’, reason: ‘-[SCIPieSegment seriesName]: unrecognized selector sent to instance 0x281881500

    legend = SCIChartLegend()
    legend.backgroundColor = SCIColor(.red)
    let dataSource = SCISeriesInfoLegendDataSource(legend: legend)
    legendModifier = SCIPieChartLegendModifier(legend: legend, dataSource: dataSource, useAutoPlacement: false)
    legendModifier.sourceSeries = renderableSeries.series
    legendModifier.margins = UIEdgeInsets(top: 17, left: 17, bottom: 17, right: 17)
    legendModifier.position = [.left, .top]

Note: I am using SwiftIUI and add the legend container to the swiftui view wrapped in an UIViewRepresentable

UIViewRepresentable(container: legend.container!)

if i comment out legendModifier.sourceSeries = renderableSeries.series the crash does not appear but the legend does not show.

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

Hello,

I found a bug where the SCILegendModifier doesn’t display the full series name. If I add 5 spaces to the series name string, I’m able to see the full series name.

Also, when using margins on the legend modifier instance, the legend fills all available space. Manually resizing the window fixes this bug.

See the photos.

1 vote
3k views

Hello,

One thing I can’t figure out is why I don’t see the axis tooltips when using SCIRolloverModifier or SCICursorModifier? If I use xAxis.axisTitleMargins = NSEdgeInsets(top: 1000, left: 0, bottom: 10, right: 0) I can see tooltips on x axis but only until some point and from there moving the cursor to the right leads to some sort of overlay and tooltip disappears. See the photos.

Is this a bug or I’m doing something wrong?

1 vote
2k views

Hello, I’m new to Swift and macOS, but I’m tasked to research SciChart. I have started my macOS trial, got my trial code from the wizard app. I’m following the Creating your first SciChart macOS App tutorial but I get Sorry! Your license token appears to be invalid error.

Here is what I’ve tried:

import Cocoa
import SciChart
import AppKit

@main
class AppDelegate: NSObject, NSApplicationDelegate {

//    override init() {
//        SCIChartSurface.setRuntimeLicenseKey("XXX")
//    }

    func applicationDidFinishLaunching(_ aNotification: Notification) {
        let licenseKey = "XXX"
        SCIChartSurface.setRuntimeLicenseKey(licenseKey)
    }

    func applicationWillTerminate(_ aNotification: Notification) {
        // Insert code here to tear down your application
    }

    func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
        return true
    }
}

Using override init() leads to Terminating app due to uncaught exception 'License Exception', reason: ''
Using SCIChartSurface.setRuntimeLicenseKey() in applicationDidFinishLaunching leads to Sorry! Your license token appears to be invalid. Please contact support with your OrderID if you believe this to be incorrect.

What am I doing wrong?

1 vote
4k views

I am trying to listen changes in pie chart segment selections. I am adding the listener like so:

piesegment.addChangeListener { changedSegment in
    print("changed selection \(changedSegment.isSelected)")
 } 

The closure is never called however. My first question is: Is this the right way of doing this? In Android I implement the PieSegmentChangeListener interface and do an addIsSelectedChangeListener on the segment. In ios the SCIPieSegmentChangeListener is not a protocol. My second question is: How can I create a my own listener like in android and add it to the segment?

By the way support should not be exired!!!!

1 vote
0 answers
3k views

Hello, I tried to copy an example to run in Xcode, when I changed it to SCIChartSurface3D, it show that “Type ‘SurfaceView’ does not conform to protocol ‘UIViewRepresentable'”, it is even I want to make a 3D chart I don’t need to change the ‘SCIChartSurface’ to ‘SCIChartSurface3D’ ?

and in the SCIUpdateSuspender.usingWith(self.surface), it said ‘Value of type ‘SurfaceView’ has no member ‘surface” ? did I do anything wrong ?

Thank you

1 vote
4k views

Trying to install SciChart using the PodSpecs-Nightly repo:

source ‘https://github.com/ABTSoftware/PodSpecs-Nightly.git’

Running pod install results in this error:

[!] Error installing SciChart
[!] /usr/bin/curl -f -L -o /var/folders/mr/0skn4y5d1t99bcvzd09g_wdr0000gn/T/d20221220-30745-gfzfrf/file.zip https://github.com/ABTSoftware/PodSpecs-Nightly/releases/download/v4.4.1-nightly.5867/SciChart_iOS_4.4.1-nightly.5867.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

Notice the word “SDK” is missing from the URL above. The correct URL should be:

https://github.com/ABTSoftware/PodSpecs-Nightly/releases/download/v4.4.1-nightly.5867/SciChart_iOS_SDK_4.4.1-nightly.5867.zip

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.

1 vote
0 answers
7k views

Hello,

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

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

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

Thanks in advance for any guidance!

0 votes
12k views

Hi guys,

I have some troubles with piecharts in swift. I want to provide custom labels outside of the piecharts segments. I found a screenshot of a nested piechart attached to an issue in your issue tracker. Thats what I want to do in swift, but I couldn’t find out a way to do so. Could you please provide an example code?

Thanks a lot in advance!
Alex

1 vote
4k views

What’s the new (Swift) signature for V2’s updateDataContext(withContext label: SCIDefaultTickLabel!, data dataValue: SCIGenericType, style: SCITextFormattingStyle!) -> SCITickLabelProtocol!? Obviously the SciGenericType is different.

My searches aren’t pulling up anything except hits on the V2 documentation, and all of those now 404.

I’m using that call to put gesture recognizers on some tick labels. I want those gesture recognizers to be different than the one I’m putting on the entire chart. And I need to update the locations every time theX axis changes. An alternate way to achieve this would also be welcome.

0 votes
5k views

Hello,

The problem is how to sign the X-axis (the time axis).
How can I change the date and time format on the x axis?
Is this possible when I use the SCICategoryDateTimeAxis?
We use the code from example to set the time format

1 vote
9k views

Hello,
I’ve been looking for the documentation of how to customize the look of the chart. I have a black/dark gray checker pattern that seems to be the default. I would like to:
1. Change the background to white, no checkerboard pattern
here is the documentation for chart background but it does not show me how to change it to white. https://www.scichart.com/documentation/ios/v2.x/webframe.html#The%20SciChartSurface%20Type.html
I have found through experimentation the I can call

surface.backgroundColor

But that just changes the axis background color

2. Make the text larger on the axis.
here is the documentation for the axis https://www.scichart.com/documentation/ios/v2.x/webframe.html#Adding%20an%20Axis%20to%20a%20SciChartSurface.html
I see these lines that were provided but they won’t compile because Xcode doesn’t know what defaultFontSize is and there are no other references to it and I still don’t see a way to set the size.

textFormat.fontName = SCSFontsName.defaultFontName
textFormat.fontSize = SCSFontSizes.defaultFontSize

I think it would be helpful to create a walkthrough for iOS that shows how to customize the background and axis. I’ve looked through the samples provided but the files are huge and I get lost trying to figure it out.
Thanks,
Warren

0 votes
8k views

When calling SCIThemeManager.ApplyTheme(Surface, SCIThemeManager.SCIChart_Bright_SparkStyleKey); within a the code-behind running on the iPhoneSimulator running iOS 13.2, the iOS system throws an Objective-C exception with the following details:

Foundation.MonoTouchException: 'Objective-C exception thrown.  Name: NSInternalInconsistencyException Reason: applyThemeProvider: must be implemented in subclass

Although the exact same pattern works without issue on the corresponding Xamarin.Android project and the examples that call this line seem to be OK too, it is not clear from any documentation what this issue could be. Any advice would be appreciated.

0 votes
7k views

I want to develop a rollover in my IOS application, like the example of Using RolloverModifier. However, the axis label & tooltip display of rollover in this example is static, I want to customize a the the label & tooltip that I want, .xib file or coding to develop also fine.

Can anyone help or give suggestions to my problems? Thanks.

  • Gumbo F asked 5 years ago
  • last active 2 years ago
1 vote
2k views

Ran “pod update” this morning and got a 404 error with SciChart 4.4.0.5839 (see below)

So I changed my podspec to specify an earlier version of SciChart (4.4.0.5778) and ran update again and it was successful. This is just an FYI to report the problem, it is not blocking the team.

My environment: MacOS 12.4, Xcode 13.4, cocoapods 1.11.3

[!] Error installing SciChart
[!] /Users/mjc/opt/anaconda3/bin/curl -f -L -o /var/folders/mr/0skn4y5d1t99bcvzd09g_wdr0000gn/T/d20220713-25489-xbnbcz/file.zip https://github.com/ABTSoftware/PodSpecs/releases/download/v4.4.0.5839/SciChart_iOS_4.4.0.5839.zip –create-dirs –netrc-optional –retry 2 -A ‘CocoaPods/1.11.3 cocoapods-downloader/1.5.1’

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 9 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0
curl: (22) The requested URL returned error: 404

0 votes
0 answers
3k views

When I ran the sample “iOS & macOS Audio, Radio frequency and Spectrum Analyzer” of “SciChart.iOS.Examples-SciChart_v4_Release”,
HeatMap graphs are not displayed on 5th generation iPads.

For iPads of generations higher than the 5th generation, the HeatMap graph is displayed.
Does SchiCharts_v4 not support 5th generation iPads?

The environment is as follows.
IOS 15.2

0 votes
0 answers
3k views

Hello,
I followed the example swiftui-helper-functions to use SciChart in SwiftUI.It works fine.
But when I try to setup majorDelta according to the max data of data series which is from view model, the chart is hang up.
And the preview of Xcode show this error “PreviewUpdateTimedOutError: Updating took more than 5 seconds”.

Here is part of my code , is there something wrong?

private var yAxis: ISCIAxis {
    let yAxis = SCINumericAxis()
    yAxis.autoRange = .always
    yAxis.growBy = SCIDoubleRange(min: 0, max: 0.1)
    yAxis.axisAlignment = .left
    yAxis.visibleRange = SCIDoubleRange(min: 0, max: viewModel.powerChartModel.powerDataSeries.yMax.toDouble() + PowerView.addVisibleRangeValue)
    yAxis.drawMajorBands = false
    yAxis.drawMajorGridLines = false
    yAxis.drawMinorGridLines = false
    yAxis.drawMinorTicks = false
    yAxis.autoTicks = false
    yAxis.majorDelta = NSNumber(value: round(viewModel.powerChartModel.powerDataSeries.yMax.toDouble() + PowerView.addVisibleRangeValue) * 0.2)
    yAxis.minorDelta = NSNumber(value: 1.0)

    return yAxis
}
  • zhou quan asked 2 years ago
  • last active 2 years ago
0 votes
0 answers
2k views

Hi, I would like to always show the tick label of the start and end of the visible range. Are there any ways to implement this in iOS?

0 votes
3k views

Hi, I’ve found that there is no example of using SciChart in SwiftUI, the swift examples are using storyboard.

I’ve tried that, using SciChart in SwiftUI, and it worked. But I have some confusions about axis update and data update.

in SwiftUI, first I create a chartview struct as NSViewRepresentable, and in func makeNSView(context: Context) -> SCIChartSurface{} to initialize the chartview as any supported SciChart view type.

second, in func updateNSView(_ nsView: SCIChartSurface, context: Context){} to update the data and axis.

When updating axis(like visiablerange), every time I need call nsView.xAxes.clear() to remove axis first and then add axis again.

When updating data, every time I need to call nsView.renderableSeries.clear() to clear current plot data first and then call nsView.renderableSeries.add() to update the data.

My confusion is that is this the right way to do that? It seems not quite efficient.

  • Keyu Yan asked 2 years ago
  • last active 2 years ago
0 votes
9k views

Hi, guys

Is there something similar like

  • (void)bringSubviewToFront:(UIView *)view;
  • (void)sendSubviewToBack:(UIView *)view;

from UIView but for chart Annotations?

Best regards,
Sushynski Andrei

0 votes
6k views

Hi, guys

Is it possible to use negative index for methods:

-(void) insertAt:(int)index X:(SCIGenericType)x Open:(SCIGenericType)open High:(SCIGenericType)high Low:(SCIGenericType)low Close:(SCIGenericType)close;

-(void) updateAt:(int)index Open:(SCIGenericType)open High:(SCIGenericType)high Low:(SCIGenericType)low Close:(SCIGenericType)close;

Can you give an answer?

Best regards,
Sushynski Andrei

0 votes
6k views

The wick for the up candlestick go through the body while the down candlestick do not. How can I make the wick inside the body part disappear? I didn’t change any settings of stroke and fill style. Thanks.

let candlestickSeries = SCIFastCandlestickRenderableSeries()
candlestickSeries.dataSeries = dataSeries
candlestickSeries.yAxisId = "right"
0 votes
2k views

Hi,

I have a very simple iOS project in XCode 13 which uses Swift. The project has a tab bar controller with two tabs. The first tab brings up a sample home screen and the second tab initializes a blank SciChart graph.

I want to eventually be able to sometimes change what data is shown on the graph (via Bluetooth), and therefore I want to run my graph code every time the tab for the graph is selected. I put all my code for SciChart inside:

override func viewWillAppear(_ animated: Bool)

and this almost works fine, but declaring

let surface = SCIChartSurface() inside of override func viewWillAppear(_ animated: Bool)

seems to be causing some sort of memory leak. Switching between tabs often causes my app to crash and XCode reports the following error message: “Terminated due to memory issue”

Is there a better way to initialize my graph to prevent this memory leak? Or is there way to flush the “surface” variable from memory when transitioning between tabs to prevent this memory issue from occurring?

My small sample project is available here which demonstrates the memory leak when switching between the home screen tab and graph tab: https://drive.google.com/file/d/1mz88R3kKvoPqSGxFzohoHGDkseSwgHPh/view?usp=sharing

Any help greatly appreciated, thanks!

0 votes
5k views

Hello,

I would like to add a corner radius (to give rounded corners) to the SciChart rollover tooltip in iOS. I saw that there is a “tooltipCornerRadius” property in “SCITooltipModifierStyleProtocol”, but I am having trouble figuring out how to use this. Can someone point me in the right direction?

Thank you.

  • C Bolton asked 2 years ago
  • last active 2 years ago
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