SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
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?
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.
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"
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!
Hello,
I would like to be able to change the rollover tooltip cursor color. It seems to be defaulted to the lineseries areastyle property color. I would like to be able to change it to a different color. I have not been able to find anything in the docs regarding how to do this.
Thank you
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.
Hello,
I need to modify iOS SCIChart tooltip behavior. I’ve been trying to follow the example at “https://www.scichart.com/example/ios-using-tooltip-modifier/“.
Using SCIChart 4.4.0.5778 I’ve noticed some class methods and parameters don’t match, but I’ve figured out most of them I think. However, I cannot determine the method to use that is equivalent to:
“override func internalUpdate(with seriesInfo: SCIXySeriesInfo)” when subclassing “SCIXySeriesTooltip”.
I did take look at the example code that is packed with the SDK. I got compiler errors in the tooltip code in the file “TooltipCustomizationChartView” when I included the framework bundled with the SDK.
Thank you for the assistance.
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.
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.
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?
I was not able to find any sample code for macOS swift on gitHub to I tried to convert the iOS one for Mac and I grabbed the key from Scichart Licensing Wizard then initialised it in app delegates didFinishLaunchingWithOptions but I am facing this issue of invalid License token.
grab the code from here:
https://drive.google.com/file/d/1POIiKuEXaa7zNlbdcwruzIEyuN5QjkMq/view?usp=sharing
Hello
Is it possible do detect taps/selection/click over Axis Titles?
Thanks!
Hello
Is it possible do detect taps/selection/click over the PointMarkers?
Thanks!
I just requested a trial key and notice that it say I have to put a license call into my app.
Does this mean my app will require internet so it can verify a license when the user starts the app?
Will it do this all the time?
I do not like this at all. I don’t want my customers asking why my app requires internet and is contacting some server when they start the app.
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?
I am adding a SCICustomAnnotation on a particular graph bar click. But the annotation always gets added to a fixed location and is not varying according to the selection. Whereas if I am adding the annotation during the init(), it’s getting added on the correct location point.
Ex:
if let annotationValue = viewModel.categoryModel?.value, annotationValue > 0 {
let customAnnotationGreen = SCICustomAnnotation()
customAnnotationGreen.horizontalAnchorPoint = .center
let imageView = UIImageView(image: #imageLiteral(resourceName: “Triangle”))
imageView.frame = CGRect(origin: .zero, size: CGSize(width: 10, height: 10))
customAnnotationGreen.customView = imageView// UIImageView(image: #imageLiteral(resourceName: "Triangle"))
if let value = viewModel.categoryModel?.graphDataPoints.values[hitTestInfo.dataSeriesIndex].toDouble() {
customAnnotationGreen.set(x1: hitTestInfo.dataSeriesIndex)
customAnnotationGreen.set(y1: value)
self.columnChart.annotations.add(customAnnotationGreen)
}
}
Hello, I’ve been trying to setup an Ellispe Point Marker graph which shows a linear regression line within the graph, I’ve copied the demo code into another project and it seems to show Ellispe Point Markers, but when I try it out using another project, it doesn’t seem to show up. The issue is that the graph shows up, along with the axis and the linear regression lines, but the Ellispe point markers don’t show up.
When I run the code, the linear regression line changes from new data that is being pushed, but the Ellispe pointer markers don’t show which I’m assuming means that the data is being pushed through/into the chart, but the point markers are specially not showing up for some reason. I’m wondering if anyone can help me regarding this situation, and I’ve looked through the code several times and I can’t seem to find what is causing my point markers to not show.
Unfortunately I can’t completely share the project due to confidentiality reason within my workplace, therefore I shared some screenshots which outline the code that is being used to for the SciChart Graph.
Any help would be greatly appreciated, and if there are any more questions regarding this issue, please let me know and I’ll try my best to answer them and provide more information. Thank you.
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.
Hi,
Using the ZoomExtentsModifier on multiple axis used to work in an earlier version of SciCharts, but is broken in 4.3.0. I have two y-axes set up, left and right on my chart, with the right-hand-side just mirroring the left. When I double-tap to zoom to the x/y range of the graph, only the x range is modified. If I disable the change listener that mirrors the range change on the primary y axis, double tap works as expected, but my right hand side y-axis no longer mirrors the primary axis range. This is how I’ve set up the dual axes:
let yAxis = SCINumericAxis()
yAxis.axisTitle = "Acceleration (g)"
yAxis.axisAlignment = .left
yAxis.visibleRangeLimitMode = .minMax
chart?.yAxes.add( yAxis )
// Add an additional visible yAxis to the right without label
let yAxisRight = SCINumericAxis()
yAxisRight.axisAlignment = .right
yAxisRight.axisId = "yAxisRight"
chart?.yAxes.add( yAxisRight )
// Sync values with left (primary) axis
yAxis.visibleRangeChangeListener = { (axis, oldRange, newRange, isAnimating) in
yAxisRight.visibleRange = newRange
}
Commenting out the listener at the bottom fixes the ZoomExtentsModifier problem, but is obviously not a workable solution. Any help would be appreciated. Thanks
Hello,
We need to add a label with the value of the yAxis on top of all Point Markers. There is an example on WPF, but found nothing on iOS.
How can we achieve that?
There are no simple macOS tutorial projects, so I transplant ios “Tutorial 01 Create Simple 2D Chart” to macOS one. (Attached file.)
Build and Run successfully. But no appear the coded chart. It seems that only SCIChartSurface is being displayed. (without axis and line series)
I enabled SciChart Console Debugging and got like this.
2021-09-17 20:48:06.077950+0900 StoryboardTest[75014:920684] [INFO] - [SCIAxisBase] isSuspended = YES. Ignoring `invalidateElement:` call
2021-09-17 20:48:06.078006+0900 StoryboardTest[75014:920684] [INFO] - [SciChartSurfaceBase] IsSuspended=YES. Ignoring `invalidateElement:` call
Why doesn’t the chart show up? Would you mind giving me some advice?
P.S.
It seems that the file was not attached properly.
Please download the file from here.
https://drive.google.com/file/d/1YfJIf0G14QOxA0fzmEQXyAEbPrfMx4CU/view?usp=sharing
Hello,
I was overriding the performZoom(at mousePoint: CGPoint, xValue: Double, yValue: Double) method of SCIPinchZoomModifier but it is not accessible anymore.
My Code:
import Foundation
import SciChart
public class FixedToCenterPinchZoomModifier : SCIPinchZoomModifier {
override func performZoom(at mousePoint: CGPoint, xValue: Double, yValue: Double) {
let middle = CGPoint(x: parentSurface?.frame.midX ?? 0,
y: parentSurface?.frame.midY ?? 0)
super.performZoom(at: middle, xValue: xValue, yValue: yValue)
}
}
I get the error: Method does not override any method from its superclass
Is there a way to access the protected method?
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?
I am using sci charts to show live graphs of some devices. While displaying a graph on IPhone X or iPhone 6s it sometimes lags and lines started overlapping. It’s working fine on devices iPhone XSMax, iPhone 11. I have attached a 3 screenshots. Once when graph starts lagging, 2nd when graph is in middle, 3 when graph completes. please have a look. It starts lagging and overlapping lines when a new graph starts and when it ends it shows a complete graph shown and then again same issue repeats. It also started working correctly after some time. I need information about this issue. How to fix it and why it’s happening like this…
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
Just trying to run the demo using these instructions: https://github.com/abtsoftware/scichart.ios.examples.
It doesn’t work I’m getting “Failed to emit precompiled header” and “SciChart/SciChart.h file not found”
Hi everyone!
I have a candlestick chart that uses SCIZoomPanModifier() so i can zoom and pan in the chart. I added a SCITooltipModifier() so i can inspect the individual data points. I noticed that by adding the toolTipModifier, that my pan and zoom stops working. I can’t figure out why. Would really appreciate if someone could tell me why or if i am missing some variable i need to set
Hi guys,
I just started using SCICHART. I am working my way through the provided tutorials and i noticed that when i add a SCITooltipModifier to the chart, all my other modifiers (zoom and pan and pinchzoom) stopped working. Is this normal? Because i want my chart to have zoom functions and show what datapoints are touched by a user.
Thanks in advance!
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)
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.
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
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
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.
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?
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.
Try to integrate new SciChart.xcframework 4.2.0 instead of SciChart.framework 2.0 to the project and build failed in Xcode 12.4 with the next errors:
RNSciCandlestickChart.swift:
1) 335th line: Editor placeholder in source file
dates.add(date!))
2) 549th line: Cannot convert value of type ‘Bundle.Type’ to expected argument type ‘Bundle’ SCIThemeManager.addTheme(byThemeKey: theme, from: Bundle)
3) 768th line: Method does not override any method from its superclass
override func internalHandleGesture(_ gestureRecognizer: UIGestureRecognizer)
AnnotationDragListener.swift:
1) 4th line: Cannot find type ‘SCIAnnotationDragListener’ in scope
class AnnotationDragListener: SCIAnnotationDragListener
RNSciLineChart.swift:
1) 475th line: Editor placeholder in source file
SCIThemeManager.addTheme(byThemeKey: theme, from: Bundle)
Can you tell me please can I launch SciChart.xcframework 4.2.0 in Xcode 12.4? Any how to solve this issues?
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.
In Scichart 2, we had some code that added some annotations in the SCIAnimation completion block. Here’s a snippet. We need the self.renderAnnotations()
to happen AFTER the chart data range is set, because we only draw annotations that will fit within the individual bar stack elements.
SCIUpdateSuspender.usingWithSuspendable(sciChartSurface) { if hasBarData { self.sciChartSurface?.renderableSeries.add(columnCollection) let animation = SCIWaveRenderableSeriesAnimation(duration: 1, curveAnimation: .easeOut) animation.completionHandler = { self.renderAnnotations() self.configurationButtons?.forEach { $0.isUserInteractionEnabled = true } } columnCollection.addAnimation(animation) }
Here’s the current rewrite to run under Scichart 4. With this code, yAxisLeft.visibleRange
has not been updated to the correct data range when renderAnnotations()
is called.
Uncommenting the 3 animator-related lines near the bottom doesn’t make a difference, and my listener function is never called.
I’ve also tried wrapping the renderAnnotations() call in a DispatchQueue.main.asyncAfter() call. That sometimes works, and sometimes results in renderAnnotations() not being called at all.
How do I get renderAnnotations() (and the following line looping on configurationButtons) to run, reliably, after the axis range setup is complete?
How do I get my wave animation back?
SCIUpdateSuspender.usingWith(sciChartSurface) { if hasBarData { self.sciChartSurface?.renderableSeries.add(columnCollection) self.renderAnnotations() self.configurationButtons?.forEach { $0.isUserInteractionEnabled = true } // let animator = SCIAnimations.createWaveAnimator(for: columnCollection) // animator.add(self) // animator.start() }
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:
Can you tell me please did I use the right version of SciChart.xcframework for apple silicone? And how to solve this errors?
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.
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`
Please tell me how to add the ability to use multiple touch. The goal is that when the user touches the screen in two places at the same time, two lines appear on the graph. I would like to understand whether this is possible?
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
Hi there,
I’m trying to display little icons as axis labels using the LabelProvider API and NSAttributedString (with NSTextAttachmet). Is this supported? Here’s a minimal example:
import UIKit
import Foundation
import SciChart
import SciChart.Protected.SCILabelProviderBase
class ViewController: UIViewController {
private lazy var chart: SCIChartSurface = {
let c = SCIChartSurface(frame: .zero)
c.xAxes.add(items: SCINumericAxis())
let yAxis = SCINumericAxis()
yAxis.labelProvider = SymbolLabelProvider()
c.yAxes.add(items: yAxis)
return c
}()
override func viewDidLoad() {
super.viewDidLoad()
SCIChartSurface.setRuntimeLicenseKey(myLicenseKey)
view.addSubview(chart)
chart.translatesAutoresizingMaskIntoConstraints = false
let guide = self.view.safeAreaLayoutGuide
NSLayoutConstraint.activate([
chart.leadingAnchor.constraint(equalTo: guide.leadingAnchor),
chart.trailingAnchor.constraint(equalTo: guide.trailingAnchor),
chart.topAnchor.constraint(equalTo: guide.topAnchor),
chart.bottomAnchor.constraint(equalTo: guide.bottomAnchor),
])
}
}
class SymbolLabelProvider: SCILabelProviderBase<SCINumericAxis> {
lazy var numberFormatter: NumberFormatter = {
let f = NumberFormatter()
f.allowsFloats = true
f.maximumFractionDigits = 2
return f
}()
init() {
super.init(axisType: ISCINumericAxis.self)
}
override func formatLabel(_ dataValue: ISCIComparable!) -> ISCIString! {
let intValue = Int(dataValue.toDouble())
let font = UIFont.init(descriptor: axis.tickLabelStyle.fontDescriptor, size: UIFont.systemFontSize * 4)
if intValue.isMultiple(of: 2) {
let i = UIImage(systemName: "circle", withConfiguration: UIImage.SymbolConfiguration(font: font))
return NSAttributedString(attachment: NSTextAttachment(image: i!))
} else {
let attributes: [NSAttributedString.Key: Any] = [
.font: font,
.foregroundColor: UIColor.yellow,
]
return NSAttributedString(string: numberFormatter.string(for: dataValue.toDouble())!, attributes: attributes)
}
}
}
See attached screenshot for the result.
If this is not supported: any suggestions / ideas for a workaround?
Thanks
—Matthias
Hi guys,
I want to show x value on chart bar itself as shown in the attached image along with this query. I tried using annotation where I need to give x and y value each time and it look not appropriate in the 2 data series column chart using, instead of that I need easy way to represent label of bar value on graph bar.
please suggest if any.
Thanks in advance.
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
Hey everyone, my team currently has Scicharts for WPF set up and functioning the way we want it too.
We are moving to Xamarin and have tested Scicharts in a Xamarin.Forms project working for Android/iOS and Windows WPF.
The next step was to install Visual Studios for Mac, and setup a new Xamarin.Forms project and pull the code from the windows version of our Xamarin.Forms project. For windows we use a custom renderer to get the scicharts to work for all platforms available on the windows version. For Mac, we are trying to get a custom renderer set up to load the swift version of the Scicharts for Mac. It’s not going so well.
Can anyone provide details on if it’s possible to get a xaramarin.forms project to load the scicharts for mac framework?
Thanks
NOTE** I picked iOS because for some reason MacOS wasn’t in the list of platforms
Hi, I want to set yaxis labels outside the chart but unable to find any solution please help.
I’m updating some code that was written against SciChart iOS v2. We have one graph in that code that relied on removeFromLegend
in a renderable series, to prevent the legend from getting ridiculous long.
As an example, suppose we have Western Earth, Western Wind, Western Fire, Eastern Earth, Eastern Wind, and Eastern Fire. Each element is styled the same, no matter where it’s located. In the legend, we only want to see Earth, Wind, and Fire. Our actual list of series is much longer…4 “elements”, up to 8 locations, making 32 legend entries, with 28 duplicates.
What’s the replacement for removeFromLegend
? How do I prevent these duplications?
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?
I was trying to test SciChart on simulator, but I have a problem: I added chart surface on my view, and after I launch an app, SciChart is showing me this text on the screen :
“Hardware rendering performance of SciChart in simulator is SLOW. Please use an actual device to feel the real-world performance”
How do I remove this text and test my charts on the simulator?
Hi,
I’d like to update the iOS version to the latest stable one (4.1.0), but after following the steps here: https://www.scichart.com/documentation/ios/current/integrating-scichart-libraries.html
Xcode keeps complaining:
framework not found SciChart.xcframework
clang: error: linker command failed with exit code 1
If I downgrade back to 3.1.1 everything works again. Any idea why the version 4.1.0 is not working? I’m using Pods to manage all dependencies.