Pre loader

Tag: 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
9k views

On device, there is an unwanted border line on the SCIChartSurface. Please refer to the screenshot.

I tried removing this by setting the border width and setting it’s colour as white as below
self.surface.view.layer.borderColor = [[UIColor whiteColor]CGColor];
self.surface.view.layer.borderWidth = 2.0f;
However, this does not set the border of the SCIChartSurface.

How do I remove this unwanted border line?

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

Hey Guys,

I have a requirement where I need to show Donut Chart Title , but adding any annotation is crashing my application.

    let textAnnotation = SCITextAnnotation()
    textAnnotation.coordinateMode = .relative
    textAnnotation.x1 = SCIGeneric(0.5)
    textAnnotation.y1 = SCIGeneric(0.5)
    textAnnotation.horizontalAnchorPoint = .center
    textAnnotation.verticalAnchorPoint = .center
    textAnnotation.text = "Test"
    textAnnotation.style.textStyle.fontSize = 14
    textAnnotation.style.textColor = UIColor.fromARGBColorCode(0xff000000);
    textAnnotation.style.backgroundColor = UIColor.clear
    chartSurface.annotations = SCIAnnotationCollection(childAnnotations: [textAnnotation])

Thanks

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

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 is 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…

I heard it was a bug in the API for Android a month ago, is this similar? Or am I doing something wrong?
Thanks in advance!

Best regards
Jonas

0 votes
0 answers
3k views

Was created react-native-charts-sci wrapper for Scichart with the structure – [Screenshot _1]. And now need to publish this package to npm private repo, but Scichart.framework folder is vast (~100 MB) and its connect in current podspec file – [Screenshot_2] like a local directory:

spec.public_header_files = “ios/SciChart.frameworks/Headers/*”
spec.vendored_frameworks = “ios/SciChart.framework”

Need to connect Scichart.framework in wrapper library like subspec that it could be taken during the installation process from vendor’s podspec repo: https://github.com/ABTSoftware/PodSpecs/tree/master/SciChart. The goal is to decrease of wrapper library folder size that would be possible to publish it to npm repo.

After adding Scichart.framework like subspec – [Screenshot_4] to podspec, get the errors after pod install – [Screenshot_3]:
– ERROR | [iOS] attributes: Can’t set version attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set authors attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set license attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set homepage attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set source attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set summary attribute for subspecs (in react-native-charts-sci/SciChart).
– ERROR | [iOS] attributes: Can’t set documentation_url attribute for subspecs (in react-native-charts-sci/SciChart).

Can you tell me please is it possible to get Scichart.framework from vendor’s podspec repo: https://github.com/ABTSoftware/PodSpecs/tree/master/SciChart and connect it like a subspec in podspec file? Need to create LICENSE.txt with the licence and write the pass of it in podspec file? Can you provide some examples with the correct way to do it? Why get this errors? What’s wrong with the current framework connection?

0 votes
6k views

Hi, guys

I have some data series like:

[[SCIXyDataSeries alloc] initWithXType:SCIDataType_DateTime
                                 YType:SCIDataType_Double
                             SeriesType:SCITypeOfDataSeries_XCategory];

Also my Y axis is kind of class SCINumericAxis

So my question is

if i’m trying add value to the series

[volumeSerie appendX:SCIGeneric(bar.time) Y:SCIGeneric([bar.volume doubleValue])];

and my bar.volume is bigger than 2 147 483 648 (float limit as i’m know). It’s leads to a axis range crash. Like on the attached image.

So what should i use to handle huge values?
Like a billions and more

Best regards,
Sushynski Andrei

0 votes
8k views

The numeric axis in our app weirdly displays the range from -2000 until 8000, even if it has or hasn’t got data series appended to it. I tried setting the VisibleRange and VisibleRangeLimit when creating the axis, but still no results. Here’s a piece of the code:

new SCINumericAxis
{
   AxisAlignment = SCIAxisAlignment.Left,
   AxisId = "axis_id",
   TextFormatting = " 0%",
   VisibleRangeLimit = new SCIDoubleRange(-30, 100),
   VisibleRange = new SCIDoubleRange(-30, 100)
};

The Y values that we have are doubles, example:

[0]: 98.26171875
[1]: 0
[2]: NaN
[3]: 98.26171875
[4]: 0
[5]: NaN
[6]: 78.203125
[7]: NaN
[8]: 38.96484375
[9]: NaN
[10]: 98.28125
[11]: 0
[12]: NaN
[13]: 68.22265625
[14]: 0

So just by looking at the values, we should have a data range from 0 to 100, but I think somehow it messes up the conversion and ends up with ridiculously large numbers. I’m not doing any additional operations on the data, the printed data above is the data from the XyDataSeries. The Y type is Double, the YMin is 0, the YMax is 98, but still ends up drawing the values until 10000.

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

Hi, guys

Is there possibility to show CursorModifier by simply changing switch state?

According to custom tooltip behaviour it is possible for SCITooltipModifier. And it’s work at v 2.0.0.xxxx

So can you provide a code with redefinitions of private Api methods for this situation?

UDP: What is the best practice to customize tooltip’s data view?

Best regards,
Sushynski Andrei

0 votes
6k views

Guys can you tell me please why I get this error after build on new `mac M1 chip and how to solve it:

error: unable to load standard library for target ‘arm64-apple-ios8.0’
/Users/nameuser/Projects/pojectname/ios/SciChart.framework/Modules/SciChart.swiftmodule/arm64.swiftinterface:1:1: error: failed to build module ‘SciChart’ from its module interface; the compiler that produced it, ‘Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)’, may have used features that aren’t supported by this compiler, ‘Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)’
// swift-interface-format-version: 1.0`

0 votes
8k views

Hi,

I’ve encountered an issue with the candlestick graph I’ve drawn that consists of a set of random X date time values – this causes the candlesticks have varying distances from one another.

Rendering the data from an initial set seems to be fine but as I run a NSTimer to add on more points, the body of the new candlesticks seem to be 0. (Note, the date time values are still random but have been made to be set after the last placed point)

In fact, the initial data points that I added see to be rendered ‘body-less’ if it’s within the same visible range as the newly added points. And if I pan along the newly added points, the bodies of some data points will appear at random visible ranges.

Is this a normal behaviour or should I take anything else into consideration?

Here are a couple of my configurations which I think may have affected anything:
1. My XAxis has set its visible range limit mode to ClipMode_Min
2. Candlestick series style data body width is set to be default.
3. I have a the following modifiers set up.

self.xDragModifier = [SCIXAxisDragModifier new];
self.xDragModifier.axisId = @"xAxis";
self.xDragModifier.dragMode = SCIAxisDragMode_Pan;
self.xDragModifier.clipModeX = SCIZoomPanClipMode_ClipAtMin;
[self.xDragModifier setModifierName:@"XAxis DragModifier"];

self.pinchZoomModifier = [[SCIPinchZoomModifier alloc] init];
[self.pinchZoomModifier setModifierName:@"PinchZoom Modifier"];
self.pinchZoomModifier.xyDirection = SCIXYDirection_XDirection;

self.zoomPanModifier = [SCIZoomPanModifier new];
self.zoomPanModifier.clipModeX = SCIZoomPanClipMode_ClipAtMin;
self.zoomPanModifier.xyDirection = SCIXYDirection_XDirection;
[self.zoomPanModifier setModifierName:@"ZoomPan Modifier"];

SCIModifierGroup * gm = [[SCIModifierGroup alloc] initWithChildModifiers:@[self.xDragModifier, self.pinchZoomModifier, self.zoomPanModifier]];
self.chartSurface.chartModifier = gm;

The points are drawing just fine, but the body of the candlestick is not appearing as expected.

Thanks in advance.

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

I’m trying to make a chart with a “toggle function”.

The “toggle function” what i wanted to make is this.

  1. enter to UIViewController which Chart is in it
  2. before singleTap on a chart, a chart has zoomPanModifier, XAxisDragModifier,, etc
  3. after make singleTap on the chart, that chart has only CursorModifier.
  4. CursorModifier’s UI stays on chart without disappearing and i can move crossed line to specific point i want (just like what CursorModifier originally does)
  5. another single tap on chart would make a chart to have all other modifiers but CursorModifer.

What I have made successfully was 1,2,3,5 . not 4.

The way i was going to solve this problem was make fake touch event on Chart view and
snatch UIGestureRecognizer Event and let ChartView think they’re being touched till I give stop signal

But I heard that there is no more way to pass fake touch to UIView.

So I’m feeling difficulty on this problem…..

is there any easy way to solve this problem?

TL;DR;

I WANT TO MAKE CURSORMODIFIER’ UI STAYS ON A CHART!

+)
(lldb) po SciChartVersionNumber
0x3ff0000000000000

(lldb) po SciChartVersionString
0x474f525029232840

I wanted to know what version I’m using.. but i couldn’t know… what version am i using..?

0 votes
0 answers
8k views

Hello.

I have previously asked a question regarding Android and Xamarin (https://www.scichart.com/questions/android/legend-outside-of-chart-area).

Now, I have the same question, but for iOS. Do you have any examples available for taking chart legend outside of chart area on iOS?

Thank you and have a nice day!

Regards,
Paul.

0 votes
13k views

Hi, guys

Is it possible to draw axis line at axis area? See attachment.

0 votes
5k views

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

Hi, guys

My x axis is SCICategoryDateTimeAxis and i’m want to draw grid line with custom period. Let’s say every four hours for data with a period of thirty minutes. What is the best way for that?

Can i redifined axis’s tickCoordinatesProvider?
Can you provide some example?
Or it only possible with axes annotations ?

Best regards,
Sushynski Andrei

0 votes
3k views

Good day! I have download this zip archive SciChart_iOS_SDK_4.2.0.5533.zip, on my laptop. Opened it and can not find the file SciChart.xcframework, according description from this article. I need to add library to Xcode frameworks, but I can not do it. Please can you tell me where can I get this file.

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…

0 votes
8k views

I would like to add scrollBar to SCINumericAxis for example xAxis.

I did find documentation:
https://www.scichart.com/documentation/v5.x/webframe.html#Scrollbars.html

But on iOS version, I can’t find numericAxis.Scrollbar is missing

0 votes
3k views

Good day!
I need to determine the value of the visible graph y from the x value and the problem is that I can’t calculate the y value outside of the data I’m rendering
example data:
[
{ x:1, y: 10 },
{ x:5, y: -5 },
{ x: 9, y: 15}
]

I use SCISplineMountainRenderableSeries and I need to show the intersection of the graph at point 3.5
I need a point but I have only one coordinate value

how can i get this y value?

0 votes
10k views

Hi, guys

My X axis is SCICategoryDateTimeAxis type.

And i have a huge amount of data to display. So i need to display it by scrolling of the chart surface.
So what is the best practice to update data series on the fly and display it at the chart surface?

Best regards,
Sushynski Andrei

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

0 votes
8k views

Hey again!

Is there kind of a delegate that notify me if the user uses the crosshair/SCIRolloverModifier?
I want to know which value he is inspecting to show him further information outside the chart for this datapoint.

Thanks and Greeting
Benedikt

0 votes
7k views

Good day guys. I have download SciChart_iOS_SDK_4.2.0.5533 on Macbook M1. And try to integrate ios-arm64_armv7 verions to my project. I have added SciChart.xcframework to frameworks in Xcode 12.4. But the build is failed with a few errors:

  1. unable to load standard library for target arm-64-apple-ios9.0
  2. Failed to build module ‘SciChart’ from its module interface, it may have been damaged or it may have triggered a bug in Swift compiler when it was produced.

Can you tell me please did I use the right version of SciChart.xcframework for apple silicone? And how to solve this errors?

0 votes
13k views

Hi,

I’ve been looking through ways to have to y-Axis scale for really small changes/values.

For example, I’m attempting to plot 10 values between 0.99300 to 0.99400, and the changes between points can vary between 0.001 to 0.0001 or so (basically, really small changes)

However, my y-Axis seems to always start at 0 and the y-Axis major ticks are always at most a 0.1 difference, making the graph look flat.

I’d like to achieve the following:
– Scale to the smallest value i can scale to.
– Have my y-Axis to not necessarily start at 0.

I’ve tried the following:

Setting up y-Axis:

    self.yAxis = [SCINumericAxis new];
    [self.yAxis setStyle:axisStyle];
    self.yAxis.axisId = @"yAxis";
    [self.yAxis setGrowBy:[[SCIDoubleRange alloc]initWithMin:SCIGeneric(0) Max:SCIGeneric(0.1)]];
    [self.yAxis setAutoRange:SCIAutoRange_Always];
    [self.chartSurface attachAxis:self.yAxis IsXAxis:NO];

Regards.

0 votes
8k views

I cannot get SCILinearGradientBrushStyle working on a donut chart. Only radial gradients work

Here is my code sample:

let segment = SCIPieSegment()
segment.fillStyle = SCILinearGradientBrushStyle(colorCodeStart: 0xff007aff, finish: 0x4D007aff, direction: .horizontal)
segment.value = 100.0
segment.title = "Segment"
donutSeries.segments.add(segment)

The segment just renders a flat color

0 votes
3k views

Is the styleFor function of SCIPaletteProvider that was in Version 2.0 not implemented in Version 4.8?
Also, are there any plans to implement it?

I am upgrading from SciCharts 2.0.1 to SciCharts 4.3.
When the color was set using SCI Palatt Provider in Version 2.0, the memory used was 200M, but in Version 4.3, the memory used may consume as much as 1G.
I tried to devise it by setting the Sampleing Mode, but it is not very effective.

SCI Charts is used to display the spectrum data of audio data while playing the sound.

0 votes
6k views

Hi, guys

Is Stacked Columns support autoRange by visible range?

I’m interesting in because sometimes my data looks like at the screenshot “huge_data.png”

And even when i have scrolled outside this data it’s looks like at the screenshot “scrolled_outside.png”

Best regards,
Sushynski Andrei

0 votes
0 answers
7k views

I have a simple chart using a an SCIDateTimeAxis to display dates along the x-axis. In some situations, the labels displayed along this x-axis are way too close together. Please see attached screenshot. I was wondering whether there is a property somewhere I can configure to increase the required “culling” space between labels? Or, failing that, what would I need to implement myself to somehow drop some of the displayed labels in order to make them more readable?

0 votes
6k views

Hi, guys

I’m very sad because of you.

On my chart i’m added SCIZoomPanModifier with clip mode SCIClipMode_ClipAtExtents. And it well worked before i have updated lib to ‘2.0.1.1748’. Now it’s works the same way as SCIClipMode_StretchAtExtents. But i don’t want to zoom by scrolling at the edge of data.

Can you look at it and fix as soon as possible?

Best regards,
Sushynski Andrei

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

Hi,

Please take a look at the attached screenshot first.

I have a chart configured to draw some data. I need to draw SCIAxisMarkerAnnotation on Y axis. And it seems that annotation has alignment by right side of axis area. Is there a possibility to change it to left side of axis area?

0 votes
6k views

How would I go about doing this in swift?

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

I am trying to zoom and pan the line graph in my macOS app the zoom is working but I am not able to pan through the zoomed graph its not at all scrolling and also I wanted to know how can I add click event on the graph so that I can display some more data on click at a particular coordinate apart from tooth. I have shared my view controller. I will really appreciate any help as I have spend a lot of time figure this out and have no clue where to go from here.

0 votes
7k views

Hi, guys

My axis is SCICategoryDateTimeAxis type. And using SCIZoomPanModifier (SCIClipMode_ClipAtExtents) to scroll chart

I’m using setVisibleRangeLimit: method to clip the axis during ZoomExtents

Until v. 2.0.0.1511 it’s work like a charm. But now something had have broken. And it’s doesn’t allow me to scroll chart at right way. It show me all of the data range on chart or only left side.

So can you fix it?

Best regards,
Sushynski Andrei

0 votes
6k views

I am placing annotations at the top of every bar in a stacked bar graph (and a standard bar graph on another screen) showing the total of all the stacked bars by iterating through my data, generating the sum, and placing it at the correct x,y (an incredibly manual process that seems like there should be much easier to do but I found no other way to do it – if there is a better way, I would love to hear it, but that’s a secondary issue and not my current problem).

I also have a legend where the user can select / deselect series.

When the user selects/deselects a series from the legend, I need to hide all my annotations and then recreate them because the sums of the stacked bars has changed (or if no bars are showing, remove my annotation completely). My assumption is I could reiterate through my data and check series to see if they are visible (isVisible) and recalculate the sums and recreate the annotations (another very manual process but I can probably work it out).

My primary problem is I see no way for me to intercept that this legend event occurred. The series get hidden internally and I never have a chance to do anything with the annotations. It seems like this may be doable on other platforms but I’m at a loss on iOS. There is no delegate / block event handler / etc.

Any thoughts?

0 votes
8k views

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,
Paul.

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

Hi.
I’m in process optimizing my app.
I’m using Objective-c.

I’d found some memory leaking issues and successfully fixed some of that.

A first issue was about ‘renderableSeries’ under ‘SCIChartSurfaceView’.
If you set class of UIView as ‘SCIChartSurfaceView’ in interface builder and make outlet without setting ‘strong’ or ‘weak’ in .m file,
It never get released automatically and will stay retained on memory.
For me, it caused about 90MB of memory leaking.
But I could solve this issue manually by putting -(void)clear; method of renderableSeries in viewWillDisappear method.

Another issue is about ‘SCIDateTimeDeltaCalculator’ and ‘SCINumericDeltaCalculator’.
It causes about 50MB of memory leaking.
But problem is, I couldn’t find neither where it’s been called nor how I release this manually.

I will be waiting for your answer.

Thanks.

+)
(lldb) po SciChartVersionNumber
0x3ff0000000000000

(lldb) po SciChartVersionString
0x474f525029232840

I wanted to know what version I’m using.. but i couldn’t know… what version am i using..?

0 votes
5k views

SplineLineRenderableSeries doesn’t render curved graph line properly in Swift , it renders stepped line for the data series .For reference please check the Screenshot attached ,ECG line(Green) rendered as stepped line (Marked by rectangle). Let me know anything I need to update in my code

Please find below the code for initialisation go the graph and updating the graph same. I am updating graph realtime with same DataSeries.

  1. Graph initialisation code

    func init_ECG_Chart()
    {
    //Remove Theme From Chart By Apply & Remove & Change Border color
    SCIThemeManager.applyTheme(to: self.ecg_Chart_Surface, withThemeKey: SCIChart_Bright_SparkStyleKey)
    SCIThemeManager.removeTheme(byThemeKey: SCIChart_Bright_SparkStyleKey)

    self.ecg_Chart_Surface.isOpaque = false
    self.ecg_Chart_Surface.backgroundColor = .clear
    self.ecg_Chart_Surface.renderableSeriesAreaBorderStyle = SCISolidPenStyle(color: .clear, thickness: 0)
    
    //Line
    let lineSeries = SCISplineLineRenderableSeries()
    
    lineSeries.strokeStyle = SCISolidPenStyle(color: ecgSelectedColor, thickness: 2.0)
    lineSeries.dataSeries = ecgLineDataSeries
    

    // lineSeries.resamplingMode = SCIResamplingMode_None //Resampling off
    // lineSeries.resamplingMode = SCIResamplingMode_Auto //Resampling off

    let xAxis = SCINumericAxis()
    xAxis.axisAlignment = .bottom
    xAxis.drawLabels = false
    xAxis.drawMajorGridLines = false
    xAxis.drawMinorGridLines = false
    xAxis.drawMajorTicks = false
    xAxis.drawMinorTicks = false
    
    let yAxis = SCINumericAxis()
    yAxis.axisAlignment = .left
    yAxis.drawLabels = false
    yAxis.drawMajorGridLines = false
    yAxis.drawMinorGridLines = false
    yAxis.drawMajorTicks = false
    yAxis.drawMinorTicks = false
    yAxis.autoRange = .never   //Stop auto ranging axis
    yAxis.visibleRange = SCIDoubleRange(min: -32, max: 96)
    

    // yAxis.visibleRangeLimit = SCIDoubleRange(min: -32, max: 96)

    yAxis.growBy = SCIDoubleRange(min: 0.2, max: 0.2)
    
    SCIUpdateSuspender.usingWith(self.ecg_Chart_Surface) {
    
        self.ecg_Chart_Surface.xAxes.add(items: xAxis)
        self.ecg_Chart_Surface.yAxes.add(items: yAxis)
        self.ecg_Chart_Surface.renderableSeries.add(items: lineSeries)
    
        //self.ecg_Chart_Surface.chartModifiers.add(items: SCIZoomExtentsModifier(),SCIPinchZoomModifier())
    }
    

    } //Init ECG

  2. Graph updation code

    func update_ECG_Chart(xValues:SCIDoubleValues,yValues:SCIDoubleValues)
    {

    SCIUpdateSuspender.usingWith(self.ecg_Chart_Surface) {
    
        self.ecgLineDataSeries.append(x: xValues, y: yValues)
      //  self.ecg_Chart_Surface.zoomExtents()
    
        self.ecg_Chart_Surface.zoomExtentsX()
    
    }
    

    } //Update ECG

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.

0 votes
6k views

I have a simple line renderable series in iOS with an SCIDateTimeAxis for X and an SCINumericAxis for Y. At this point all I’m trying to do is format the Y-axis labels and cursor labels as currency. According to the documentation, this should be as simple as:

yAxis.textFormatting = "$%f"

But it does not appear to properly use this formatting. The Y-axis is showing values like “$%f1400” when formatting a value for 14.

So, I instead attempted creating my own label provider by overriding SCINumericLabelProvider:

class CurrencyLabelProvider: SCINumericLabelProvider {

static let formatter: NumberFormatter = {
    let formatter = NumberFormatter()
    formatter.numberStyle = .currency
    return formatter
}()

override func formatLabel(_ dataValue: SCIGenericType) -> NSAttributedString! {
    let value = dataValue.doubleData
    let string = CurrencyLabelProvider.formatter.string(from: NSNumber(value: value))!
    return NSAttributedString(string: string)
}
}

Then assigning:

yAxis.labelProvider = CurrencyLabelProvider()

This works to properly format the axis labels. So, I also override SCINumericLabelProvider to provide the cursor labels:

 override func formatCursorLabel(_ dataValue: SCIGenericType) -> NSAttributedString! {
    let value = dataValue.doubleData
    let string = CurrencyLabelFormatter.formatter.string(from: NSNumber(value: value))!
    return NSAttributedString(string: string)
}

This then properly formats the cursor label for the Y-axis- but it also formats the X-axis cursor:
Formatted Cursor

At this point, the X-axis is already assigned an SCIDateTimeLabelProvider- the X-axis is not assigned CurrencyLabelProvider. But it seems to be overridden by the Y-axis label provider or simply unused. The X-axis labels are formatted as dates properly, but X-axis cursor values are just numbers when not being interfered with by the Y-axis label provider.

Am I misunderstanding something or are these all bugs in the iOS SDK? We’re currently evaluating whether this package will meet our needs and it certainly appears to be riddled with issues.

  • Sean Young asked 5 years ago
  • last active 5 years ago
0 votes
7k views

Hi, guys

I want to show two renderableSeries on one chart view. These series have common x-axis (SCICategoryDateTimeAxis) and separate y-axes(SCINumericAxis). Only one of y-axis is visible at chart view. Also the data series of visible renderable series updated by scrolling to left or to right. So for displaying on one view i’m using:

[y1Axis setGrowBy: [[SCIDoubleRange alloc] initWithMin:SCIGeneric(0.3) Max:SCIGeneric(0.07)]];
[y2Axis setGrowBy: [[SCIDoubleRange alloc] initWithMin:SCIGeneric(0.0) Max:SCIGeneric(5)]];

So it’s look good at start (Correct_zooming.png). But after some scrolling it decrease axis extents of invisible y-axis (decrease.png).
Or even breaks down (broken.png)

For test i’m using SCIFastOhlcRenderableSeries and SCIHorizontallyStackedColumnsCollection readerable series.
Data series for SCIHorizontallyStackedColumnsCollection is initializated like:

    [volumeSerie1 updateAt:index Y:SCIGeneric(100000 / [multiplier doubleValue])];
    [volumeSerie2 updateAt:index Y:SCIGeneric(500000 / [multiplier doubleValue])];

So can you look at it?
Or what way i should implement this behavior?

Best regards,
Sushynski Andrei

0 votes
8k views

I’m trying to add annotations on a chart but they are rendering above my legend.

Initially (similar to most of the demo code I’ve seen), I setup my modifiers, then created my series and animated them in — then added my annotations (adding to annotationGroup). This created a timeline of blank chart surface with legend (good so far), annotations popping in before the chart series animated in (weird / not good) and on TOP of the legend (really bad), then the animation of the series after that.

I’ve tried about everything I can think of and the best I’ve been able to do is use a completion block of the animation rendering the series — and moved my chart modifiers (and legend) into that completion block. If I put the annotations in the completion block, they will render after the chart modifier and I have the same problem (even if placed after the chart modifiers). I have to set the annotations before the animation, and then the chart modifier in the completion block will work and the legend will be above the . Of course, this is a bit odd too — as first my annotations pop up by themselves on the blank surface, followed by my series animating in, then at the end of the 2 second animation, the legend just pops in.

I really would like my legend to be rendered first on the blank surface and the annotations and chart series to animate in together under my legend. I’m gathering that’s unlikely (at least the animation part) — but is there anyway I can place my legend first and still have the annotations go under it? It feels like the layers should be: modifiers > annotations > rendered series. I also I’ve read this order before in some WPF docs I believe, but doesn’t seem to be respected on iOS?

UPDATE: My current work around isn’t sufficient because I really need access to the renderable series to create the annotations which means I really can’t defer my chart modifiers (i.e. legend) until after the annotations. Additionally, if I need to update (remove / re-add) an annotation due to a series being deactivated in the legend, now my annotations are on top of the legend again.

0 votes
4k views

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) {
                self.data.ecmDataSeries.update(z:self.data.ecm2DMatrix[i][j], atX: i, y: j)
            }
0 votes
4k views

I want to hide the axis and the place occupied by the axis on xammarin.iOS, i’am using below code to do the same, the problem here is it does hide the axis but it is not removing the place occupied by axis,

Axis.IsVisible = false;

is it the right way to hide the axis and remove the place occupied by it, or am I missing something here.

0 votes
3k views

Hi all,
I am using the iOS SciCharts version to implement a heatmap series in my application. I am testing out the heatmap by providing a test series of random 100 zValues that range from 1-200. The Heatmap with the stops below just appears blue (see image). My suspicion is that either I am not updating the zValues correctly or the andStops is too low. Can anyone provide insights on what could be the issue?

//Test zValues
let SpectTestArray: [Double] = [ 12,  14, 68, 137, 164, 124, 124, 122, 162, 128, 45, 129,  40,  91,  53, 159,  77,  59,   0,  91, 92,  73,  77,  67, 163,  69, 149, 115,  17,  85, 119, 129, 186,  93,  80,  34, 159, 115,  65, 181, 159,  67, 152,  29,   6, 162,  51, 196, 186, 122, 114, 171, 159, 116,  20, 102,   4, 174, 144, 160, 89,  51,  89, 130, 172, 186,  40, 174,  20, 120, 88, 151, 127, 167,  10,  49, 198,  67, 184, 197, 152, 193, 196, 163,  18,  77,  17, 143, 124, 115, 1, 115, 126,  22,  35,   6,  58, 121,  77,   5]

let colors = [UIColor.fromARGBColorCode(0xFF00008B)!, UIColor.fromARGBColorCode(0xFF6495ED)!, UIColor.fromARGBColorCode(0xFF006400)!, UIColor.fromARGBColorCode(0xFF7FFF00)!, UIColor.yellow, UIColor.red]

CH1HeatMapRenderableSeries = SCIFastUniformHeatmapRenderableSeries()
        CH1HeatMapRenderableSeries.dataSeries = CH1SpectDataSeries
        CH1HeatMapRenderableSeries.minimum = 0.0
        CH1HeatMapRenderableSeries.maximum = 200.0
        CH1HeatMapRenderableSeries.colorMap = SCIColorMap(colors: colors, andStops: [0.0, 0.2, 0.4, 0.6, 0.8, 1.0])
        spectchartsurface?.renderableSeries.add(CH1HeatMapRenderableSeries)

        var Spectvalues = SCIDoubleValues(capacity: 100)

        for n in 0...SpectTestArray.count-1 {
            Spectvalues.add(SpectTestArray[n])
        }
//        print(Spectvalues)
        CH1SpectDataSeries.update(z: Spectvalues)
Showing 51 - 100 of 108 results

Try SciChart Today

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

Start TrialCase Studies