Hi,
I’m trying to convert Java code to swift and I need the same CustomCategoryDateAxis class as Yura’s answer: https://www.scichart.com/questions/android/setvisiblerangelimitmode-on-xaxis
I try to inherit from SCICategoryDateAxis but there is no isZoomConstrainSatisfied and coerceVisibleRange overrides.
How can i write the same code in swift?
Tnx.
- apiftechnics api asked 4 years ago
- last active 4 years ago
Hello,
I’m trying to convert Android (Java) code to iOS (Swift), and I need to create a custom SCIZoomPanModifier. In the android code, onFling, onDown, and onDown were overridden, but I can’t seem to do that in iOS. How can I override onFling, onDown, and onUp in iOS to mimic the android code?
Thanks
- Yatharth Chhabra asked 4 years ago
- last active 4 years ago
Hi,
How can i listen annotation selection changes? I try this code but i’m getting error “Cannot assign to property: ‘lineAnnotation’ is immutable”
var lineAnnotation = SCILineAnnotation()
lineAnnotation.annotationSelectionChangedListener = { (annotation, isSelected) in
//
}
Tnx.
- apiftechnics api asked 4 years ago
- last active 4 years ago
SciChart 3.1.0.5175 running on iOS 13.6
Please see this short video which demonstrates the issue: https://youtu.be/HjtWZDZeyXM
I have a chart showing a single Spline data series. The data series never drops below zero, yet the chart shows multiple points where the line drops below zero as you zoom in and out. This behavior changes as the zoom level changes.
Is this expected behavior for the spline chart? Is there a way to change the behavior so the chart does not show these sub-zero points?
private func drawChart()
{
createChartSurface()
let series = self.getPositionSeries( name: name, color: color, results: resultsSession.rearResults )
self.sciChartSurface?.renderableSeries.add(series)
}
private func createChartSurface()
{
// If we created a chart surface previously then we need to remove it from the superview
sciChartSurface?.removeFromSuperview()
// Create a SCIChartSurface. This is a UIView so can be added directly to the UI
sciChartSurface = SCIChartSurface()
sciChartSurface?.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(sciChartSurface!)
//sciChartSurface?.autoresizingMask = [.flexibleHeight, .flexibleWidth] // chart bottom falls off the view without this
sciChartSurface?.topAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.topAnchor).isActive = true
sciChartSurface?.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor).isActive = true
sciChartSurface?.leftAnchor.constraint(equalTo: self.view.leftAnchor).isActive = true
sciChartSurface?.rightAnchor.constraint(equalTo: self.view.rightAnchor).isActive = true
// Create an XAxis and YAxis. This step is mandatory before creating series
let xaxis = SCINumericAxis()
xaxis.axisTitle = "Seconds"
sciChartSurface?.xAxes.add(xaxis)
let yaxis = SCINumericAxis()
yaxis.axisTitle = "Position (mm)"
yaxis.axisId = "p" // position
yaxis.axisAlignment = .right
sciChartSurface?.yAxes.add(yaxis)
let yaxis = SCINumericAxis()
yaxis.axisTitle = "Speed mm/s"
yaxis.axisId = "s" // speed
yaxis.axisAlignment = .left
sciChartSurface?.yAxes.add(yaxis)
addModifiers()
}
private func getPositionSeries( name: String, color: UIColor, results: ResultData ) -> SCISplineLineRenderableSeries
{
let positionData = SCIXyDataSeries(xType: .double, yType: .double)
positionData.seriesName = name
let start = resultsSession.indexStart + 1
let last = resultsSession.indexEnd
for index in start ... last {
let t1 = resultsSession.sensorData[index-1].time
let t2 = resultsSession.sensorData[index].time
if ((t2-t1) == 1) {
let x = Double(t2) / resultsSession.sampleRate
let y = results.axleData[index].position
positionData.append(x: x, y: y)
} else {
// There was a gap in the data. Fill in the gap with a horizontal line.
let y = results.axleData[index-1].position
for tx in (t1 + 1) ... t2 {
let x = Double(tx) / resultsSession.sampleRate
positionData.append(x:x, y:y)
}
}
}
let positionSeries = SCISplineLineRenderableSeries() // SCIFastLineRenderableSeries()
positionSeries.dataSeries = positionData
positionSeries.yAxisId = "p"
positionSeries.strokeStyle = SCISolidPenStyle(color: color, thickness: 1.0)
return positionSeries
}
- Michael Chartier asked 4 years ago
- last active 4 years ago
Hello,
I need to display realtime chart with 20 series of data. My data is arriving at 500Hz. When I’m displaying this data, I find that after a while SciChart hangs with what appears to be a deadlock.
I’ve read as much as I can find about realtime graphing with SciChart and I started with tutorial 4 – Adding Realtime Updates. This article (https://www.scichart.com/questions/wpf/is-xydataseries-safe-to-being-changed-in-a-separate-thread) suggests that SciChart is thread safe so I tried using a second thread to feed data into a graph. My only change was to move from the main thread timer in the example to a GCD timer running at 500Hz. With this, I’m easily able to reproduce the deadlock in around 1.5 seconds.
Here is the main thread which is attempting to render:
Thread 1 Queue : com.apple.main-thread (serial)
#0 0x0000000192bc8c20 in __psynch_rw_rdlock ()
#1 0x0000000192ae4864 in _pthread_rwlock_lock_wait ()
#2 0x0000000192ae47fc in _pthread_rwlock_lock_slow$VARIANT$mp ()
#3 0x0000000104a93828 in -[SCIRenderableSeriesLock initWithRenderableSeries:] ()
#4 0x0000000104ab742c in -[SCIRenderSurfaceRenderer p_SCI_updateCoreData:renderPassState:viewportSize:] ()
#5 0x0000000104ab6f4c in -[SCIRenderSurfaceRenderer p_SCI_renderLoop:assetManager:renderPassState:] ()
#6 0x0000000104ab6dc4 in -[SCIRenderSurfaceRenderer onDrawWithContext:andAssetManager:] ()
#7 0x00000001049c50c0 in -[SCIRenderSurfaceDrawable2D drawFrameIn:withDrawableSize:] ()
#8 0x0000000104ad4db8 in -[SCITwisterRendererBase drawFrameIn:withDrawableSize:] ()
#9 0x00000001049e56c8 in -[SCIMetalRenderer drawFrameIn:withDrawableSize:] ()
#10 0x0000000104a25b70 in -[SCIMetalRenderSurfaceBase draw] ()
#11 0x00000001999861ec in -[CALayer display] ()
#12 0x00000001999984d4 in CA::Layer::layout_and_display_if_needed(CA::Transaction*) ()
#13 0x00000001998e11d8 in CA::Context::commit_transaction(CA::Transaction*, double) ()
#14 0x000000019990ab78 in CA::Transaction::commit() ()
#15 0x000000019990b58c in CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) ()
#16 0x0000000192d50fbc in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
#17 0x0000000192d4beb0 in __CFRunLoopDoObservers ()
#18 0x0000000192d4c32c in __CFRunLoopRun ()
#19 0x0000000192d4bc38 in CFRunLoopRunSpecific ()
#20 0x000000019d39a38c in GSEventRunModal ()
#21 0x0000000196e7c444 in UIApplicationMain ()
#22 0x00000001042cc478 in main at /Users/mall/Downloads/SciChart.iOS.Examples-SciChart_v3_Release/tutorials/tutorials-2d/Tutorial 04 - Adding Realtime Updates/Tutorial 04 - Adding Realtime Updates/AppDelegate.swift:5
#23 0x0000000192bd38f0 in start ()
and here is my worker thread adding data to a series:
Thread 11 Queue : com.apple.root.default-qos.overcommit (concurrent)
#0 0x0000000192bc8c20 in __psynch_rw_rdlock ()
#1 0x0000000192ae4864 in _pthread_rwlock_lock_wait ()
#2 0x0000000192ae47fc in _pthread_rwlock_lock_slow$VARIANT$mp ()
#3 0x0000000104ac1518 in -[SCIXDataSeries p_SCI_searchDataIndexOn:xMinAsDouble:xMaxAsDouble:downSearchMode:upSearchMode:] ()
#4 0x0000000104ac1368 in -[SCIXDataSeries getIndicesXRange:xMinAsDouble:xMaxAsDouble:isCategoryAxis:] ()
#5 0x0000000104ac1b34 in -[SCIXDataSeries getWindowYRangeWithXCoordCalc:getPositiveRange:] ()
#6 0x0000000104aceddc in -[SCIRenderableSeriesBase getYRange:positive:] ()
#7 0x00000001049b25ac in -[SCIRangeCalculationHelper2DBase getWindowedYRangeWithXCalculators:] ()
#8 0x0000000104a05f84 in -[SCIAxisBase getWindowedYRangeWithXRanges:] ()
#9 0x00000001049f4184 in -[SCIChartSurface p_SCI_zoomExtentsYWithCalculators:andDuration:] ()
#10 0x00000001049f3d14 in -[SCIChartSurface p_SCI_zoomExtentsWithDuration:] ()
#11 0x00000001042c79e8 in closure #1 in ViewController.handleTimer() at /Users/mall/Downloads/SciChart.iOS.Examples-SciChart_v3_Release/tutorials/tutorials-2d/Tutorial 04 - Adding Realtime Updates/Tutorial 04 - Adding Realtime Updates/ViewController.swift:84
#12 0x00000001042c7500 in thunk for @escaping @callee_guaranteed () -> () ()
#13 0x0000000104abdae0 in +[SCIUpdateSuspender usingWithSuspendable:withBlock:] ()
#14 0x00000001042c7824 in ViewController.handleTimer() at /Users/mall/Downloads/SciChart.iOS.Examples-SciChart_v3_Release/tutorials/tutorials-2d/Tutorial 04 - Adding Realtime Updates/Tutorial 04 - Adding Realtime Updates/ViewController.swift:79
#15 0x00000001042c9250 in partial apply ()
#16 0x00000001042cb1e4 in closure #1 in closure #1 in RepeatingTimer.timer.getter at /Users/mall/Downloads/SciChart.iOS.Examples-SciChart_v3_Release/tutorials/tutorials-2d/Tutorial 04 - Adding Realtime Updates/Tutorial 04 - Adding Realtime Updates/RepeatingTimer.swift:26
#17 0x00000001042c7500 in thunk for @escaping @callee_guaranteed () -> () ()
#18 0x0000000107093730 in _dispatch_client_callout ()
#19 0x0000000107096390 in _dispatch_continuation_pop ()
#20 0x00000001070a9614 in _dispatch_source_invoke ()
#21 0x00000001070a4d74 in _dispatch_root_queue_drain ()
#22 0x00000001070a5698 in _dispatch_worker_thread2 ()
#23 0x0000000192aeab38 in _pthread_wqthread ()
Here is my version of the ViewController class from Tutorial 4 with the GCD timer (note that it uses RepeatingTimer class found here: https://gist.github.com/danielgalasko/1da90276f23ea24cb3467c33d2c05768) – my changes are marked with the //MALL comment:
import UIKit
import SciChart
class ViewController: UIViewController {
//MALL
private var timer = RepeatingTimer(timeInterval: 1.0/500.0)
private let pointsCount = 200
private var count: Int = 0
private let lineData = SCIDoubleValues()
private lazy var lineDataSeries: SCIXyDataSeries = {
let lineDataSeries = SCIXyDataSeries(xType: .int, yType: .double)
lineDataSeries.seriesName = "Line Series"
lineDataSeries.fifoCapacity = 300
return lineDataSeries
}()
private let scatterData = SCIDoubleValues()
private lazy var scatterDataSeries: SCIXyDataSeries = {
let scatterDataSeries = SCIXyDataSeries(xType: .int, yType: .double)
scatterDataSeries.seriesName = "Scatter Series"
scatterDataSeries.fifoCapacity = 300
return scatterDataSeries
}()
private var surface: SCIChartSurface {
return view as! SCIChartSurface
}
override func loadView() {
viewRespectsSystemMinimumLayoutMargins = false
view = SCIChartSurface()
}
override func viewDidLoad() {
super.viewDidLoad()
let xValues = SCIIntegerValues()
for i in 0 ..< pointsCount {
xValues.add(Int32(i))
lineData.add(sin(Double(i) * 0.1))
scatterData.add(cos(Double(i) * 0.1))
count += 1
}
lineDataSeries.append(x: xValues, y: lineData)
scatterDataSeries.append(x: xValues, y: scatterData)
let lineSeries = SCIFastLineRenderableSeries()
lineSeries.dataSeries = lineDataSeries
let pointMarker = SCIEllipsePointMarker()
pointMarker.fillStyle = SCISolidBrushStyle(colorCode: 0xFF32CD32)
pointMarker.size = CGSize(width: 10, height: 10)
let scatterSeries = SCIXyScatterRenderableSeries()
scatterSeries.dataSeries = scatterDataSeries
scatterSeries.pointMarker = pointMarker
let legendModifier = SCILegendModifier()
legendModifier.orientation = .horizontal
legendModifier.position = [.bottom, .centerHorizontal]
legendModifier.margins = UIEdgeInsets(top: 0, left: 0, bottom: 10, right: 0)
SCIUpdateSuspender.usingWith(self.surface) {
self.surface.xAxes.add(items: SCINumericAxis())
self.surface.yAxes.add(items: SCINumericAxis())
self.surface.renderableSeries.add(items: lineSeries, scatterSeries)
self.surface.chartModifiers.add(items: SCIPinchZoomModifier(), SCIZoomExtentsModifier())
self.surface.chartModifiers.add(items: SCIRolloverModifier(), legendModifier)
}
// MALL
timer.eventHandler = handleTimer
timer.resume()
}
// MALL
private func handleTimer() {
let x = count
SCIUpdateSuspender.usingWith(surface) {
self.lineDataSeries.append(x: x, y: sin(Double(x) * 0.1))
self.scatterDataSeries.append(x: x, y: cos(Double(x) * 0.1))
// zoom series to fit viewport size into X-Axis direction
self.surface.zoomExtents()
self.count += 1
}
}
}
Thanks in advance for any help you can offer.
- Mark Alldritt asked 4 years ago
- last active 4 years ago
Currently we have two graph surfaces with two Y axes on each side and we need all of the Y axes to have fixed width size. Until now we were achieving that like this:
topGraphSurface.LeftAxisAreaForcedSize = 45;
topGraphSurface.RightAxisAreaForcedSize = 45;
bottomGraphSurface.LeftAxisAreaForcedSize = 45;
bottomGraphSurface.RightAxisAreaForcedSize = 45;
but since updating to the new SciChart v3 we get the error “SciChartSurface does not contain a definition for (Left)AxisAreaForcedSize”. I couldn’t find any information about this in the Migration guide, so is there a way to achieve this in the new version?
- Martina Papaliska asked 4 years ago
- last active 4 years ago
I’m tested on iPhone 8 (iOS 13.5.1) and iPad (iPadOS 13.5.1). On iPad the graph always works great but on iPhone sooner or later it always fails.
The exception is always “Thread 1: EXC_BAD_ACCESS (code=1, address=0x11d927ffc)” in the application main:
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); <–
}
}
in the task stack:
SciChart`XValuesProviderWrapper<int>::GetDoubleValue:
0x103b530e0 <+0>: ldr x8, [x0, #0x8]
0x103b530e4 <+4>: ldr w8, [x8, w1, sxtw #2] <--
0x103b530e8 <+8>: scvtf d0, w8
0x103b530ec <+12>: ret
The truth is, I have no idea what’s going on. .. Please, anyone know what might be happening?
Thank you very much!
Due to the app upgrade, the code is in objective-c. This is my initialization code:
- (void) loadSciChartSurface:(SCIChartSurface*)surface {
sciChartSurface = surface;
sciChartSurface.translatesAutoresizingMaskIntoConstraints = true;
// scroll
SCIZoomPanModifier *zoomPan = [SCIZoomPanModifier new];
zoomPan.receiveHandledEvents = true;
zoomPan.zoomExtentsY = false;
zoomPan.direction = SCIDirection2D_XDirection;
[sciChartSurface.chartModifiers add:zoomPan];
// zoom
SCIPinchZoomModifier *pinchZoomModifier = [SCIPinchZoomModifier new];
pinchZoomModifier.direction = SCIDirection2D_XDirection;
pinchZoomModifier.scaleFactor = 1.5;
[sciChartSurface.chartModifiers add:pinchZoomModifier];
// series
rSeries = [SCIFastLineRenderableSeries new];
xAxis = [SCINumericAxis new];
yAxis = [SCINumericAxis new];
xAxis.visibleRangeChangeListener = ^(id<ISCIAxis> axis, id<ISCIRange> oldRange, id<ISCIRange> newRange, BOOL isAnimating) {
int min = newRange.minAsDouble;
int max = newRange.maxAsDouble;
int center = (min + max) / 2;
if (center <= 0) {
axis.visibleRange.min = @(0.0 - xHalfWidth);
axis.visibleRange.max = @(xWidth - xHalfWidth);
} else if (center >= dataSamples) {
axis.visibleRange.min = @(dataSamples - xHalfWidth);
axis.visibleRange.max = @(dataSamples + xHalfWidth);
} else {
// xWith is updated to keep the zoom factor in limits, when (center <= 0) or (center >= dataSamples)
xWidth = max - min;
xHalfWidth = xWidth / 2;
}
};
[SCIUpdateSuspender usingWithSuspendable:sciChartSurface withBlock:^{
[sciChartSurface.xAxes add:xAxis];
[sciChartSurface.yAxes add:yAxis];
[sciChartSurface.renderableSeries add:rSeries];
[SCIAnimations sweepSeries:rSeries duration:0.0 andEasingFunction:[SCICubicEase new]];
}];
dataSeries = [[SCIXyDataSeries alloc] initWithXType:SCIDataType_Int yType:SCIDataType_Short];
// x
xWidth = theFileFormat.mSampleRate * MIN_SECONDS_IN_GRID * 1;
xIndex = 0;
xHalfWidth = xWidth / 2;
xAxis.visibleRange = [[SCIDoubleRange alloc] initWithMin:0.0 max:xWidth];
// y
yAxis.visibleRange = [[SCIDoubleRange alloc] initWithMin:SHRT_MIN max:SHRT_MAX];
[self loadDefaultStyle];
}
- Vicente Broseta asked 4 years ago
- last active 4 years ago
I am setting SCIDateTimeAxis as my XAxis by using the code:
let xAxis = SCIDateTimeAxis()
xAxis.style.labelStyle.color = UIColor.darkGray
xAxis.textFormatting = “dd MMM”
xAxis.visibleRange = SCIDateRange(dateMin: 2019-07-29 11:30:00, max:2019-07-29 11:30:00)
As I have a requirement to change the application Language to THI.
How can I set the locale to the axis, so the label visible on the axis should displayed in THI language.
As right now it is always visible in english irrespective of the language like 1 sep, 20 sep, 10 oct, 30 oct, 20 nov .
Please help.
Thanks
Vikas Ahuja
- Vikas Ahuja asked 4 years ago
- last active 4 years ago
SciChart 3.1.0.5175
iOS 13.5
Xcode 10.15.5
If I am using the API incorrectly please let me know. I am not aware of any requirement to wait after using the SciChart API.
It appears the SCILegendModifier has some kind of timing bug. If you draw a chart on a surface with a legend, then clear the chart, then add another plot to the same surface you will notice the legend has stale data. However, if you clear the surface and wait a second before you add the new plot it will work as expected.
I created a sample Xcode project to demonstrate the issue. See the attachment chart.zip
I also created a video to demonstrate the issue: https://youtu.be/1JBTd1sfVgI
I have a workaround so this is not urgent, but I would like to remove the delay for my production release.
- Michael Chartier asked 4 years ago
- last active 4 years ago
Hello
In the real-time line chart, I want an animation like the video(link below).
Can you be provided with animations such as a point where a point drawn in real time continues to blink?
https://drive.google.com/file/d/1tcSFNPwSR4XEZqMX_t8GK2vzV5NUQUcn/view?usp=sharing
- Jinsu Park asked 4 years ago
- last active 4 years ago
Hello, I have tried to see if it is possible to show the rollover without showing any labels so that is is just a vertical bar. I was searching on StackOverflow and a few answers said it was not possible to omit any of the values from the graph. I did see that we can customize the cursor, is it possible to just have it be a vertical bar instead of a cross?? Then I could just use it instead of the default rollover.
I am linking a mockup we made of what we want to make. In the image, you have the graphic showing where the use as pressed, and above the graphic, we will show and update a graphic with the relevant information for that point.
Also, I will need to programmatically dismiss it so it will need to stay visible even if the user is panning or zooming.
- Pascale Beaulac asked 4 years ago
- last active 4 years ago
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)
}
- Yatharth Chhabra asked 4 years ago
- last active 4 years ago
Hi guys,
I’m currently evaluating SciChart on iOS using Swift. It seems to have an excellent level of customisation and is almost a drop-in fit for what were are looking for.
I’m creating a timeline chart of candlesticks which the user can pan through. However while the zooming of the Y axis keeps the candles nicely in frame, the zoom snaps into place instantly as the pan happens which is very disorienting. Searching the docs, I cannot see a way to cause a smooth animation as the chart automatically zooms in and out.
This is probably the only thing that we really need to do to make this product work for us so hopefully there is an answer to solve this for us!
Thanks in advance!
- David Monagle asked 4 years ago
- last active 4 years ago
I am using an SCINumericAxis for my y-axis. I am setting the visibleRange to (Min = 28, Max = 76). I am leaving the minorsPerMajor to the default of 5. However when looking at my graph (attached) you can see that the major tick labels are actually every 6 minors, e.g. 30, 36, 42, etc. when they should be 30, 35, 40, etc for minorsPerMajor set to 5.
Please advise on how to fix this issue as my major tick labels should be every 5, not every 6.
- Brad Taber asked 4 years ago
- last active 4 years ago
See the screen shot (attached)
To dupe this start on the SciChart home page, select documentation, select iOS, then enter anything into the search box.
I get the same results with Chrome and Safari.
- Michael Chartier asked 4 years ago
- last active 4 years ago
I have followed the example at: https://www.scichart.com/documentation/ios/current/legend-modifier.html for creating a legend with a custom item.
The initial problem I am trying to solve is that the default legend has a black background but my chart is white. If I set the background of the legend to white, this is a problem because the series text is white, so you can’t read it any longer. Therefore in order to have a legend with a white background to match my chart, I needed custom legend items to be able to set the series text color to black.
I have created my ChartLegendCell.swift file based on the example and my ChartLegendCell.xib which has a UIView and a UILabel. I incorporate these into my code exactly as in the example. However the legend does not show up upon render. I added a breakpoint inside the ChartLegendCell.swift class and I see bindSeriesInfo method called twice per series. What I noticed is that the first time it is called, printing out self.bounds shows (0,0,230,35) which is correct, but the second time it is called self.bounds is (0,0,0,0).
Is there more code which needs to be added in the ChartLegendCell.swift to make sure the width and height aren’t 0?
- Brad Taber asked 4 years ago
- last active 4 years ago
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.
- Paulius Zukas asked 4 years ago
- last active 4 years ago
Hello,
We have an app where we need to specify a different width for each column. I have attached an image of the result we want. We are currently using “SCIFastColumnRenderableSeries” for the diagram, but all columns have a fixed width and I couldn’t find any way to modify it.
Do you have any suggestions how to accomplish this?
Thanks!
- Alexandru Motoc asked 4 years ago
- last active 4 years ago
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
- Jonas Olsson asked 6 years ago
- last active 4 years ago
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!
- Yatharth Chhabra asked 4 years ago
- last active 4 years ago
I am trying to add a legend to my chart similar to how is done in the LegendChartView.swift code in the sample app. However the legend does not show and I get several NSLayoutConstraints conflicts such as this one:
[LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (
"<NSLayoutConstraint:0x283528af0 UIButton:0x13c52d840.height == 25 (active)>",
"<NSLayoutConstraint:0x2835285f0 UIButton:0x13c52d840.bottom == UIView:0x13c545060.bottom - 4 (active)>",
"<NSLayoutConstraint:0x2835285a0 V:|-(4)-[UIButton:0x13c52d840] (active, names: '|':UIView:0x13c545060 )>",
"<NSLayoutConstraint:0x283528b40 'UIIBSystemGenerated' SCIDefaultLegendItem:0x13c543f90.top == UIView:0x13c545060.top (active)>",
"<NSLayoutConstraint:0x283528b90 'UIIBSystemGenerated' V:[UIView:0x13c545060]-(0)-| (active, names: '|':SCIDefaultLegendItem:0x13c543f90 )>",
"<NSLayoutConstraint:0x283529c20 'UIView-Encapsulated-Layout-Height' SCIDefaultLegendItem:0x13c543f90.height == 0 (active)>" )
Will attempt to recover by breaking constraint <NSLayoutConstraint:0x283528af0 UIButton:0x13c52d840.height == 25 (active)>
The internal SCIDefaultLegendItems look to keep setting their width and height to 0 which causes conflicts with the underlying UIButton and UILabel components.
Any thoughts on how to get around this? My chart has four series. I have seen the article on drawing the legend outside the chart surface area however I do not want to do that.
Thank you!
- Brad Taber asked 4 years ago
- last active 4 years ago
Hi,
There is a strange displaying behavior of custom annotation. I added custom annotation using the code below.
let imageView = UIImageView(image: UIImage(named: imageName))
imageView.frame = CGRect(origin: .zero, size: CGSize(width: 10, height: 10))
let customAnnotation = SCICustomAnnotation()
customAnnotation.customView = imageView
customAnnotation.verticalAnchorPoint = .bottom
customAnnotation.horizontalAnchorPoint = .center
customAnnotation.set(x1: xCoordinate)
customAnnotation.set(y1: yCoordinate)
sciChartSurface?.annotations.add(items: customAnnotation)
The result looks good, but when I move surface left and right, custom annotation would go outside of bounds. Like the image I uploaded.
Please help me solve the issue.
Thanks.
- Tsung-Han Wu asked 4 years ago
- last active 4 years ago
i want to insert 500 data on the left of chart.
then, it freezes slightly.
so, i want to present indicator.
how can i listen to start and end of drawing?
- mssup mssup asked 5 years ago
- last active 4 years ago
When I add CursorModifier programmatically on long tap I have to remove my finger from screen and press it again In order to CursorModifier become visible
Is it possible to do the following?

1) scroll chart horizontally

2) long tap on screen

3) add CursorModifier programmatically and show it immediately

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

5) remove finger from screen and remove CursorModifier so I can scroll again
Thank you for reply in advance!
- Dok God asked 4 years ago
- last active 4 years ago
Hello,
Would it be possible to receive some information on how to take the legend outside of the chart surface area? We are having an issue when the user selects more axis’ to be shown in the chart. The chart then shrinks horizontally making the legend difficult to access for removing the axis’.
A quick how to with some code example would be highly appreciated. To further highlight, this is Xamarin.iOS project we are talking about.
Thank you and have a nice day.
Best Regards
- Paulius Zukas asked 4 years ago
- last active 4 years ago
iPhone 6, OS 12.4.3., X-axis, Y-axis texts are shown in inverted text. We can see this issue if we download the AppStore version of SciChart app
- Nathaniel Thomas asked 4 years ago
- last active 4 years ago
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 ?
- Nathaniel Thomas asked 4 years ago
- last active 4 years ago
We are having an issue which is preventing us from upgrading to a newer version of Xamarin iOS SciChart.
With Xamarin iOS SciChart v3, the UpdateTicks method from SCINumericTickProvider cannot be overridden, because it doesn’t exist (at least not public).
In Xamarin Android SciChart v3, it works with overriding the UpdateTicks method.
In Xamarin iOS SciChart v2, it was possible to customize the ticks by overriding the method GetMajorTicksFromAxis from the class SCINumericTickProvider.
It looks like the types generation from iOS to Xamarin C# has missed to correctly export the UpdateTicks method as public overridable. (Because the docs say it should be there and it is there on Android Xamarin.)
- Jens Stolz asked 4 years ago
- last active 4 years ago
We need to generate adhoc ipa file for review purpose and we are using the trial version, but its fails. Can you help us on the same?
- Nathaniel Thomas asked 4 years ago
- last active 4 years ago
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 ?
- Nathaniel Thomas asked 4 years ago
- last active 4 years ago
Dear SCICharts support:
We have a very large project that must be migrated to version 3 because right it uses version 2.
I am stuck in the following issues:
1/ I cannot convert Double or Date to ISCIComparable.
Our x axis contains Date-timestamp values and I am trying to find the index of the dataseries.xValues of a specific Date having as parameter my Date value which is Date type and not ISCIComparable.
How can I do this ?
When I try my attempt 1:
let x: Double = <DoubleValue>
let index = dataSeries.xValues.findIndex(of: x, searchMode: .nearest, isSorted: true)
I am getting the build error: “Cannot convert value of type ‘Date?’ to expected argument type ‘ISCIComparable?'”
When I try my attempt 2:
If I also try to iterate the xValues and find the ISCIComparable value which has doubleValue equal the x then I get the error “Type ‘ISCIList?’ does not conform to protocol ‘Sequence'”
I mean something like this:
let x: Date = Date()
var comparableValue: ISCIComparable? = nil
for val in dataSeries.xValues {
if val.toDate() == x {
comparableValue = val
}
}
So any solution please ?
2/ I am trying to update the last point of dataSeries using this code:
let lastPoint = dataSeries.count - 1
if let open = dataSeries.openValues.value(at: lastPoint) {
dataSeries.update( open: open,
high: max(dataSeries.highValues().value(at: lastPoint).toDouble(), mbidPrice),
low: min(dataSeries.lowValues().value(at: lastPoint).toDouble(), mbidPrice),
close: mbidPrice,
at: lastPoint) }
and I get the error “Cannot convert value of type ‘ISCIComparable’ to expected argument type ‘ISCIValues?’ “
Why ? How should I do this ?
Thanks a lot in advance
- Dxat asked 4 years ago
- last active 4 years ago
I’m using Xamarin.iOS and the SciChart.iOS NuGet. When adding a LabelProvider
to an axis the iPhoneSimulator with iOS 13.2 crashes without warning or exception back to the phone menu. This issue is not present on Android using the same API usage pattern.
This effect is not just in my own apps but can be replicated by running the latest Examples app on the same simulator. Examples which demonstrate the same behaviour include “Custom Theme”, Stacked Column Side by Side Chart”, “Using Theme Manager”, all of which set the LabelProvider
in the source code.
Is this a known bug? Maybe an incompatibility with the latest version of Xamarin.iOS.
I noticed that this issue has been reported before.
This is a deal breaker for us at the moment as formatting axis labels is pretty crucial.
- Adrian Harwood asked 4 years ago
- last active 4 years ago
Hi,
I am using SciChart_iOS_SDK_3.0.0.5074 with Swift 5.
I want to show string type on X-axis. I am using below code snippet.
class YearsLabelProvider: SCILabelProviderBase<SCINumericAxis> {
var xLabels: [String] = ["Test", "Test", "Test", "Test", "Test", "Test", "Test", "Test", "Test", "Test", "Test", "Test", "Test", "Test"]
func update(_ axis: ISCIAxisCore!) { }
override func formatLabel(_ dataValue: ISCIComparable!) -> ISCIString! {
let index = Int(dataValue.toDouble())
return NSString(string: index >= 0 && index < xLabels.count ? xLabels[index] : "")
}
override func formatCursorLabel(_ dataValue: ISCIComparable!) -> ISCIString! {
let index = Int(dataValue.toDouble())
var result: String?
if (index >= 0 && index < xLabels.count) {
result = xLabels[index]
}
return NSString(string: result!)
}
}
Application crashes while loading with the following error –
” *** Terminating app due to uncaught exception ‘Initializer not allowed Exception’, reason: ‘Parameterless initializer of Chart.YearsLabelProvider class shouldn’t be used. Please use one of the designated initializers instead'”
Kindly help us resolving this issue since this is a showstopper issue.
I would also like to know about what data SCIXyDataSeries accepts when we are working with strings.
- suraj gaikwad asked 4 years ago
- last active 4 years ago
Stacked Bar chat: If we give 0 values, there are Black lines showing at middle of screen. please see attached screen.
- Nathaniel Thomas asked 4 years ago
- last active 4 years ago
We are using stacked bar chart, and showing only 6 bars visible at a time.
In the X-Axis, the month labels are missing for alternate months & only displays all month label as a flash when graph is being scrolled. Is there any way to fix this.
- Nathaniel Thomas asked 4 years ago
- last active 4 years ago
When there are 2 or more horizontal/vertical axis, how to hide the cursor label for specific axis?
- Chris Yeung asked 6 years ago
- last active 4 years ago
On clicking any where on stacked bar chart it shows the x axis value. How can we disable the highlight ?
- Nathaniel Thomas asked 4 years ago
- last active 4 years ago
How can we restrict stacked graph chart scrolling to future date ?
- Nathaniel Thomas asked 4 years ago
- last active 4 years ago
After upgraded SciChart to SciChart_iOS_SDK_3.0.0.5074, using rollover modifier on a SciChart surface which was embedded into a scroll view will crash the app. It crashed when user scroll horizontally on a SciChart surface inside a horizontal scrollable scrollview. It is the same with the vertically scrollable scrollview.
2020-03-09 10:14:15.489302+0800 ******[4835:62890] -[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x60000ba28500
2020-03-09 10:14:15.503967+0800 *******[4835:62890] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x60000ba28500’
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c91fd4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff23c75c4c forwarding + 1436
4 CoreFoundation 0x00007fff23c77f78 _CF_forwarding_prep_0 + 120
5 SciChart 0x000000011139aaba -[SCITouchModifierBase onEvent:] + 186
6 SciChart 0x000000011135dfd8 +[SCIEventManager raiseOnEvent:toTarget:isMaster:] + 267
7 SciChart 0x000000011132d03f __38-[SCIEventDispatcher p_SCI_commonInit]_block_invoke + 165
8 SciChart 0x000000011132d45d -[SCIEventDispatcher raiseOnEvent:withAction:] + 569
9 SciChart 0x000000011133fa94 -[SCIChartSurfaceBase p_SCI_onTouchEvent:] + 233
10 SciChart 0x000000011133f996 -[SCIChartSurfaceBase touchesCancelled:withEvent:] + 209
11 UIKitCore 0x00007fff480bf863 forwardTouchMethod + 340
12 UIKitCore 0x00007fff480bf974 -[UIResponder touchesCancelled:withEvent:] + 49
13 UIKitCore 0x00007fff480bf863 forwardTouchMethod + 340
14 UIKitCore 0x00007fff480bf974 -[UIResponder touchesCancelled:withEvent:] + 49
15 UIKitCore 0x00007fff480a4a43 __106-[UIApplication _cancelViewProcessingOfTouchesOrPresses:withEvent:sendingCancelToViewsOfTouchesOrPresses:]_block_invoke + 609
16 UIKitCore 0x00007fff480a429e -[UIApplication _cancelTouchesOrPresses:withEvent:includingGestures:notificationBlock:] + 1163
17 UIKitCore 0x00007fff480a47ac -[UIApplication _cancelViewProcessingOfTouchesOrPresses:withEvent:sendingCancelToViewsOfTouchesOrPresses:] + 158
18 UIKitCore 0x00007fff47c37f2f -[UIGestureEnvironment _cancelTouches:event:] + 707
19 UIKitCore 0x00007fff47c40115 -[UIGestureRecognizer _updateGestureForActiveEvents] + 1779
20 UIKitCore 0x00007fff47c31eda _UIGestureEnvironmentUpdate + 2706
21 UIKitCore 0x00007fff47c3140a -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 467
22 UIKitCore 0x00007fff47c3117f -[UIGestureEnvironment _updateForEvent:window:] + 200
23 UIKitCore 0x00007fff480d04b0 -[UIWindow sendEvent:] + 4574
24 UIKitCore 0x00007fff480ab53b -[UIApplication sendEvent:] + 356
25 UIKit 0x0000000114ad2bd4 -[UIApplicationAccessibility sendEvent:] + 85
26 UIKitCore 0x00007fff4812c71a __dispatchPreprocessedEventFromEventQueue + 6847
27 UIKitCore 0x00007fff4812f1e0 __handleEventQueueInternal + 5980
28 CoreFoundation 0x00007fff23bd4471 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
29 CoreFoundation 0x00007fff23bd439c __CFRunLoopDoSource0 + 76
30 CoreFoundation 0x00007fff23bd3b74 __CFRunLoopDoSources0 + 180
31 CoreFoundation 0x00007fff23bce87f __CFRunLoopRun + 1263
32 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
33 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
34 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
35 ****** 0x000000010b51505f main + 143
36 libdyld.dylib 0x00007fff5227ec25 start + 1
37 ??? 0x0000000000000001 0x0 + 1
)
- Gary Chan asked 4 years ago
- last active 4 years ago
I’ve received this crash report for a long time since I use this SDK.
But now it’s the largest amount of crash report in the newest version.
Do you have any idea about this?
I use the SDK to show meter temperature and humidity data. It’s about 10k to 30k data show in the chart and every time the user has download the data or the user zoom, drag the chart will recalculate the min, max, avg number in the visible time range.
Thank you~
- Switch Bot asked 4 years ago
- last active 4 years ago
Hi,
i want to disable the pan effect when user long press on chart and allow the user to scroll only in the currently visible range to view the rollover tooltip so that user can see the reading in the current visible range. Once the long press is release, then enable the pan effect again.
Currently when user try to see the reading using rollover tooltip, the whole chart is moving. I have tried removing and adding the zoompanmodifier on long press gesture in ios. But it is not working.
Thank you in advance.
- Manoj Kulkarni asked 4 years ago
Hi I am using pod ‘SciChart’, ‘3.0.1-nightly.5114’.
Q1)How get selected series instance, index. How to change the color of the selected series.(Using UITapGestureRecognizer and HitTest).
Q2)How to show only Min and Max tick label value of Y Axis. Just want to hide the intermediate tick labels in between Min and Max of Y Axis.
Q3)How to give some spaces at beginning and end of the series in Scichart.
Q4)How to hide the square gray stroke around the Scichart.
- sudhir Ranjan asked 4 years ago
Hello Team,
In Pie Chart with DonutSeries, the segment spacing seems to have no effect on graph.
donutSeries.segmentSpacing = 10
Thanks
- Sandeep Dhull asked 5 years ago
- last active 4 years ago
I’m getting the following crash:
2020-02-14 16:45:43.902812-0500 CommonStock Development[2425:710225] -[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x282ffe080
2020-02-14 16:45:43.904098-0500 CommonStock Development[2425:710225] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x282ffe080’
whenever I try to scrub my chart, I must also note that in order for the legend to show, I have to tap really hard on the surface.
This is my code:
func set(data set: SimpleChartDataSet, alternate: SimpleChartDataSet) {
let lineDataSeries = SCIXyDataSeries(xType: .double, yType: .double)
let dashedDataSeries = SCIXyDataSeries(xType: .double, yType: .double)
let group = DispatchGroup()
group.enter()
DispatchQueue.global(qos: .userInteractive).async {
for (index, i) in set.enumerated() {
lineDataSeries.append(x: Double(index), y: Double(i))
}
for (index, i) in alternate.enumerated() {
dashedDataSeries.append(x: Double(index), y: Double(i))
}
group.leave()
}
group.notify(queue: .main) {
let lineSeries = SCIFastMountainRenderableSeries()
lineSeries.zeroLineY = set.min() ?? 0.0
lineSeries.dataSeries = lineDataSeries
lineSeries.strokeStyle = SCISolidPenStyle(color: UIColor.green, thickness: 2.0)
lineSeries.areaStyle = SCILinearGradientBrushStyle(start: CGPoint(x: 0, y: 1), end: CGPoint(x: 0, y: 0), start: UIColor.green, end: UIColor.clear)
let dashedSeries = SCIFastLineRenderableSeries()
dashedSeries.zeroLineY = set.min() ?? 0.0
dashedSeries.dataSeries = dashedDataSeries
dashedSeries.strokeStyle = SCISolidPenStyle(color: UIColor.white, thickness: 2.0, strokeDashArray: [2.0,2.0,2.0,2.0])
SCIUpdateSuspender.usingWith(self.surface) {
self.surface.xAxes.clear()
self.surface.yAxes.clear()
self.surface.renderableSeries.clear()
let xAxis = SCINumericAxis()
xAxis.drawLabels = false
xAxis.drawMajorBands = false
xAxis.drawMajorGridLines = false
xAxis.drawMinorGridLines = false
xAxis.drawMinorTicks = false
xAxis.drawMajorTicks = false
xAxis.drawLabels = false
let yAxis = SCINumericAxis()
yAxis.drawLabels = false
yAxis.drawMajorBands = false
yAxis.drawMajorGridLines = false
yAxis.drawMinorGridLines = false
yAxis.drawMinorTicks = false
yAxis.drawMajorTicks = false
yAxis.drawLabels = false
self.surface.xAxes.add(items: xAxis)
self.surface.yAxes.add(items: yAxis)
self.surface.renderableSeries.add(items: lineSeries, dashedSeries )
self.surface.chartModifiers.add(SCIRolloverModifier())
}
}
}
- jose solorzano asked 4 years ago
- last active 4 years ago
I didn’t see anything in any docs, so I am just wanting to verify this info…
Is this correct that you have to link in and ship the libSwiftCore (+ other swift libs) with an app using SciCharts on iOS? When I added the chart library to my app; the app crashed at startup with missing dynamic load of libSwiftCore.dylib on a real device (emulators run fine).
Enabling ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES in the build settings fixed this issue. But this surprised me that the SciChart library would actually require Swift.
Was this intentional; or did the library somehow pickup an unintentional reference somewhere….
- Nathanael Anderson asked 4 years ago
- last active 4 years ago
Originally my chart would
– create the surface
– setup the chart modifiers
– setup the axis
– add the data (SCIFastLineRenderableSeries).
However, it appears that when you .add(new SCIFastLineRenderableSeries) it recreates all the tooltips on each add, and finally on the very last SCIFastLineRenderableSeries that is inserted will get two duplicate tooltips. This happens both with the default tooltips or custom tooltips.
I finally noticed that some of your examples you setup the modifiers at the end after adding the data. So I moved all the chart modifiers into a separate function and called it after the data is setup, and now the proper number of tooltips appears.
This might either need to be noted somewhere prominent in the iOS docs; or even better the order shouldn’t matter.
- Nathanael Anderson asked 4 years ago
- last active 4 years ago
I don’t know if this affects any earlier versions; but the version my app is using is the 5098.
I created a surface with the following modifiers:
– SCIZoomPanModifier
– SCIZoomExtentsModifier
– SCIPinchZoomModifier
On the SCIZoomExtentsModifier I have **SCIDirection2D_XyDirection ** (also tried YDirection alone)
And when you double tap on the display; only the X direction resizes back down to the proper size. The Y direction is 100% ignored.
Seems to have to do with using a SCILogarithmicNumericAxis on the Y axis. I have tried commenting out all settings applied to the SCILogarithmicNumericAxis; and no change in the ability to re-zoom back to normal size. If I use a SCINumericAxis instead; the Y zooms back out properly…
- Nathanael Anderson asked 4 years ago
- last active 4 years ago
I found the example for spline drawing, but it’s still missing the gradient brush that mountain series have, how can I add it? thanks
- jose solorzano asked 4 years ago
- last active 4 years ago
Hi SciChart team,
there is a working example that implement a Polar Chart type for iOS?
I was unable to find anything in the documentation. Only for WPF platform.
If not, there is a plan to support this kind of chart in next release of the library?
Thanks for the help.
- Samuele Scatena asked 4 years ago
- last active 4 years ago
I’m updating from Xamarin iOS SciChart v2 to v3 and just hit the issue that i can not use a custom TickProvider because there is no overridable UpdateTicks method.
I could not find any TickProvider code in the v3 Examples so the docs are my only source:
https://www.scichart.com/documentation/ios/current/axis-ticks—tickprovider-and-deltacalculator-api.html
According to the docs, I should override SCINumericTickProvider or SCIDateTickProvider
class CustomNumericTickProvider: SCINumericTickProvider
{
public override void UpdateTicks(SCIDoubleValues minorTicks, SCIDoubleValues majorTicks)
{
//...
}
}
But there is no UpdateTicks method to override.
I tried to override the Update() method instead:
public override void Update()
{
Ticks.Clear();
Ticks.MajorTicks.Add(5);
//...
}
But that is just causing a freeze/crash at runtime.
It’s worth noting that it works well on Android because there is a UpdateTicks method to override.
What should I do?
- Wil O asked 4 years ago
- last active 4 years ago