The SciChartDemo compiles and runs just fine out of the box. If I change any of the .m files from “Objective-C” to “Objective-C++” and try to compile I have a linker error:
No matching function for call to ‘SCI_constructGenericType’
Expanded from macro ‘SCIGeneric’
Candidate function not viable: no known conversion from ‘const char [2]’ to ‘char *’ for 2nd argument
If I cast 2nd argument in the macro to (char *) I get the following error:
“SCI_constructGenericType(void*, char*)”
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Am I mistaken if I believe that this has to do something with C++ name mangling? More specifically: how can I use SCIGeneric(x) macro in Objective-C++ file?
Thanks.
- Igor Peric asked 7 years ago
- last active 7 years ago
When I create a SCIChartSurface programmatically, following the Quick Start guide:
https://www.scichart.com/documentation/ios/current/creating-your-first-scichart-ios-app.html#adding-scichartsurface-purely-from-code
Functionally everything works as expected, but I see a series of these messages in the log:
[CAMetalLayer nextDrawable] returning nil because allocation failed.
I do not see these messages when the SCIChartSurface is instantiated via a storyboard.
- Julian Symes asked 4 years ago
- last active 4 years ago
i want to implement a custom modifier to track the users touch, similar to rollover but without displaying a view
I tried to do this by implementing SCIGestureModifier and overriding all the onTouches methods, but – no matter the user behaviour – the modifier will always receive an onTouchesCancelled event after about a second and receive no more of these events after that.
What does work is implement onPanGesture to actually track all the user’s movement but i don’t see any way of how you would receive a touch up event this way (which i do need)
Is there any fundamental misunderstanding on how this should work on my side?
- Hubert Weid asked 5 years ago
- last active 5 years ago
Hi,
I am currently trying the iOS Charting Library and want to implement a Column series with the drill-down functionality (when touching one of column points by end user). Does the charting component supports the hit-testing or selection feature to determine which point has been clicked at runtime?
Thanks!
Liza
- liza yudup asked 8 years ago
- last active 8 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
Hello everyone.
We are trying to migrate to V3 in our iOS project and we have many issues.
One of the most important is the implementation of vertically-draggable horizontal lines.
I have a nice working code for SCICharts V2 but I cannot find any similar example of how we can implement a custom modifier for moving an SCIHorizontalLineAnnotation vertically in V3.
We have done it already with the V2 but now that we have to migrate to V3 there is a huge missing part in your documentation.
Our code was using-overiding onPanGesture() in order to figure out if the modifier should handle the touching event, then we were using the touch point in order to find the closer horizontal lines and choose the closest one in order to change the vertical value depending on the touching-changing point.
The only similar example that I found in your documentation (https://www.scichart.com/example/ios-custom-modifier/) is using SCIGestureModifier which is not accesible by the V3.
I am trying to use your SCIChartModifierBase class but cannot find anywhere a similar example of what we need.
I already tried to understand how you want us to use the ” override func onEvent(_ args: SCIModifierEventArgs!) ” function of the
SCIChartModifierBase but still no luck, it is impossible to figure out without any kind of a similar example.
The reason of needing an example is that this task needs much more information like these:
1. How to decide if the modifier should handle the touch event and how it should be ignored or handled by the next modifier in the same group ?
2. How to handle the touch started, changed, cancelled events ?
3. How to say in realtime to other modifiers in the same group that we need to to handle the same event simultaneously with this custom modifier ?
4. How to say to the group of modifiers that after the first modifer is taken the touch event then the rest should not use it ?
I will paste here our current implementation that we have done for V2 and needs to be transformed to V3 in case you need more details.
An important part is how we add the modifiers on the chart and this is how we are doing it right now:
let zoom = SCIPinchZoomModifier()
zoom.direction = .xDirection
let group = SCIChartModifierCollection(collection: [CustomModifier(chart: self),
PanModifier(),
zoom])
//group.handleGestureFirstOnly = true // Not existing in V3 anymore ! How should we do it in V3 ?
chart.chartModifiers = group
I believe that this code will be really useful for many people out there even for V2 or for migrating to V3.
Swift iOs code using SCICharts V2:
class Modifier: SCIGestureModifier {
private weak var control: ChartView?
private var editingProperty: ChartView.BindableProperty?
private var calculator: SCICoordinateCalculatorProtocol?
init(chart: ChartView?) {
self.control = chart
}
override func onPanGesture(_ gesture: UIPanGestureRecognizer?, at view: UIView?) -> Bool {
guard let chart = view as? SCIChartSurface,
let gesture_ = gesture
else { return super.onPanGesture(gesture, at: view) }
let location = gesture_.location(in: chart)
switch gesture_.state {
case .began:
control?.sendActions(for: .touchDown)
editingProperty = testForDraggableLine(location: location, in: chart)
calculator = yAxis().getCurrentCoordinateCalculator()
if editingProperty != nil {
// Annotations on SciChart don't have Zindex and we want current line to be on the top
let draggableLines = control?.chart.annotations.array.compactMap { $0 as? DraggableLine }
if let myLine = draggableLines?.first(where: { $0.bindingKeyValue == editingProperty }) {
control?.chart.annotations.remove(myLine)
control?.chart.annotations.add(myLine)
}
control?.isTouchingLine(isTouching: editingProperty != nil)
}
return editingProperty != nil
case .changed:
if editingProperty != nil {
handleDraggingLines(location: location, in: chart)
return true
}
case UIGestureRecognizer.State.ended:
if editingProperty != nil {
control?.sendActions(for: .editingDidEnd)
editingProperty = nil
_ = control?.adjustYRange(force: true)
control?.sendActions(for: .valueChanged)
control?.refreshPositions()
control?.isNotTouchingLine()
return true
}
case UIGestureRecognizer.State.cancelled:
if editingProperty != nil {
control?.sendActions(for: .editingDidEnd)
editingProperty = nil
_ = control?.adjustYRange(force: true)
control?.sendActions(for: .valueChanged)
control?.refreshPositions()
control?.isNotTouchingLine()
return true
}
default:
break
}
return false
}
private func handleDraggingLines(location: CGPoint, in chart: SCIChartSurface) {
guard let renderSurface = chart.renderSurface,
let yCalculator = self.calculator,
let editingProperty = editingProperty else { return }
let pointInChart = renderSurface.point(inChartFrame: location)
let valueForYAxis = yCalculator.getDataValue(from: Double(pointInChart.y))
control?.setValue(Decimal(valueForYAxis), forKey: editingProperty.rawValue)
}
// SOS: Filter possible properties that can be returned. We want to always avoid return - and then - dragging the current price bid or ask !
private func testForDraggableLine(location: CGPoint, in chart: SCIChartSurface) -> ChartView.BindableProperty? {
let hitTestDistance: Double = 30 // Pixels !
let nearItems = chart.annotations.array
.compactMap { $0 as? DraggableLine }
.filter { item in
return item.bindingKeyValue != ChartView.BindableProperty.ask &&
item.bindingKeyValue != ChartView.BindableProperty.bid &&
!item.isHidden &&
item.yDistance(from: location) <= hitTestDistance
}
return nearItems
.sorted { $0.yDistance(from: location) < $1.yDistance(from: location) }
.first?.bindingKeyValue
}
}
- Dxat asked 4 years ago
- last active 3 years ago
Hello!
Great work, thanks a lot for this framework!
Could you provide an example of animated inserting of a new point? My goal is to implement interpolation between previous retrieved and last point on the real-time line chart.
- Alexander Edunov asked 8 years ago
- last active 2 years ago
I have just learned how to use sci-chart framework with tutorials.
And I tried to add values from bluetooth as realtime chart as shown in tutorials.
I have finished receiving data from a Bluetooth connection.
However, using scichart to represent this data in real time is hard to solve by looking at the tutorial alone.
Does anyone have any idea how to use real-time tutorials to teach you how to represent your own data, not the example sine graph?
The code below is what I tried and is wrong.
import UIKit
import CoreBluetooth
import SciChart
let maestroServiceCBUUID = CBUUID(string:”495sdfd3-FE7D-4AE5-8FA9-9FAFD205E455″)
let maestroBrainDataCBUUID = CBUUID(string: “4953sdf3-1E4D-4BD9-BA61-23C647249616”)
class HRMViewController: UIViewController {
var sciChartSurface: SCIChartSurface?
var lineDataSeries: SCIXyDataSeries!
var scatterDataSeries: SCIXyDataSeries!
var lineRenderableSeries: SCIFastLineRenderableSeries!
var scatterRenderableSeries: SCIXyScatterRenderableSeries!
var timer: Timer?
var phase = 0.0
var i = 0
@IBOutlet weak var brainRateLabel: UILabel!
var centralManager: CBCentralManager!
var maestroPeripheral:CBPeripheral!
override func viewDidLoad() {
super.viewDidLoad()
sciChartSurface = SCIChartSurface(frame: self.view.bounds)
sciChartSurface?.autoresizingMask = [.flexibleHeight, .flexibleWidth]
sciChartSurface?.translatesAutoresizingMaskIntoConstraints = true
self.view.addSubview(sciChartSurface!)
let xAxis = SCINumericAxis()
xAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))
sciChartSurface?.xAxes.add(xAxis)
let yAxis = SCINumericAxis()
yAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))
sciChartSurface?.yAxes.add(yAxis)
createRenderableSeries()
addModifiers()
centralManager = CBCentralManager(delegate: self , queue: nil)
// Make the digits monospaces to avoid shifting when the numbers change
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if nil == timer{
timer = Timer.scheduledTimer(withTimeInterval: 0.01, repeats: true, block: updatingDataPoints)
}
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
if nil != timer{
timer?.invalidate()
timer = nil
}
}
func updatingDataPoints(timer:Timer){
i += 1
lineDataSeries.appendX(SCIGeneric(i), y: SCIGeneric(cos(Double(i)*0.1 + phase)))
scatterDataSeries.appendX(SCIGeneric(i), y: SCIGeneric(cos(Double(i)*0.1 + phase)))
phase += 0.01
sciChartSurface?.zoomExtents()
sciChartSurface?.invalidateElement()
}
func createDataSeries(_brainwave2:Double){
// Init line data series
lineDataSeries = SCIXyDataSeries(xType: .double, yType: .double)
lineDataSeries.fifoCapacity = 500
lineDataSeries.seriesName = “line series”
// Init scatter data series
// scatterDataSeries = SCIXyDataSeries(xType: .double, yType: .double)
// scatterDataSeries.fifoCapacity = 500
// scatterDataSeries.seriesName = “scatter series”
for i in 0...500{
lineDataSeries.appendX(SCIGeneric(i), y: SCIGeneric(_brainwave2))
// scatterDataSeries.appendX(SCIGeneric(i), y: SCIGeneric(cos(Double(i)*0.1)))
}
i = Int(lineDataSeries.count())
}
func createRenderableSeries(){
lineRenderableSeries = SCIFastLineRenderableSeries()
lineRenderableSeries.dataSeries = lineDataSeries
scatterRenderableSeries = SCIXyScatterRenderableSeries()
scatterRenderableSeries.dataSeries = scatterDataSeries
sciChartSurface?.renderableSeries.add(lineRenderableSeries)
sciChartSurface?.renderableSeries.add(scatterRenderableSeries)
}
func addModifiers(){
let xAxisDragmodifier = SCIXAxisDragModifier()
xAxisDragmodifier.dragMode = .pan
xAxisDragmodifier.clipModeX = .none
let yAxisDragmodifier = SCIYAxisDragModifier()
yAxisDragmodifier.dragMode = .pan
let extendZoomModifier = SCIZoomExtentsModifier()
let pinchZoomModifier = SCIPinchZoomModifier()
let rolloverModifier = SCIRolloverModifier()
let legend = SCILegendModifier()
let groupModifier = SCIChartModifierCollection(childModifiers: [xAxisDragmodifier, yAxisDragmodifier, pinchZoomModifier, extendZoomModifier, legend, rolloverModifier])
sciChartSurface?.chartModifiers = groupModifier
}
func brainwaveReceived(_ brainWave:Double){
let brainWave = brainWave * 3.3 / 65536
brainRateLabel.text = String(brainWave)
print(“brainwave: (brainWave)”)
}
}
extension HRMViewController: CBCentralManagerDelegate {
func centralManagerDidUpdateState(_ central: CBCentralManager) {
switch central.state {
case .unknown:
print("central.state is . unknown")
case .resetting:
print("central.state is . resetting")
case .unsupported:
print("central.state is . unsupported")
case .unauthorized:
print("central.state is . unauthorized")
case .poweredOff:
print("central.state is . poweredOff")
case .poweredOn:
print("central.state is . poweredOn")
centralManager.scanForPeripherals(withServices:nil)
}
}
func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {
print(peripheral)
if peripheral.name == “MAESTRO1” {
// maestroPeripheral = peripheral
centralManager.stopScan()
maestroPeripheral = peripheral
maestroPeripheral.delegate = self
central.connect(maestroPeripheral)
}
}
func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {
print(“Connected!”)
maestroPeripheral.discoverServices([maestroServiceCBUUID])
}
}
extension HRMViewController:CBPeripheralDelegate{
func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) {
guard let services = peripheral.services else {return}
for service in services {
print(service)
peripheral.discoverCharacteristics(nil, for: service)
}
}
func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
guard let characteristics = service.characteristics else {return}
for characteristic in characteristics {
print(characteristic)
if characteristic.properties.contains(.read){
print("\(characteristic.uuid): properties contain .read")
}
if characteristic.properties.contains(.notify){
print("\(characteristic.uuid): properties contain .notify")
peripheral.setNotifyValue(true , for: characteristic)
}
}
}
func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic,
error: Error?) {
switch characteristic.uuid {
case maestroBrainDataCBUUID:
let wave = Double(brainData(from: characteristic))*3.3/65536
createDataSeries(_brainwave2:wave)
default:
print("Unhandled Characteristic UUID: \(characteristic.uuid)")
}
}
private func brainData(from characteristic: CBCharacteristic) -> Int {
guard let characteristicData = characteristic.value else { return -1 }
let byteArray = UInt8
let firstBitValue = byteArray[0] & 0x01
if firstBitValue == 0 {
// Heart Rate Value Format is in the 2nd byte
return Int(byteArray[1])
} else {
// Heart Rate Value Format is in the 2nd and 3rd bytes
return (Int(byteArray[1]) << 8) + Int(byteArray[2])
}
}
}
- JaeHwan Seol asked 6 years ago
- last active 6 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
Hello,
One thing I can’t figure out is why I don’t see the axis tooltips when using SCIRolloverModifier or SCICursorModifier? If I use xAxis.axisTitleMargins = NSEdgeInsets(top: 1000, left: 0, bottom: 10, right: 0)
I can see tooltips on x axis but only until some point and from there moving the cursor to the right leads to some sort of overlay and tooltip disappears. See the photos.
Is this a bug or I’m doing something wrong?
- Tihomir Manushev asked 1 year ago
- last active 1 year ago
Hello,
I’m following along with the tutorial. I installed using the pod. I am at the end of Tutorial 3 and am getting an error. Use of unresolved Identifier ‘SciGeneric’. I can see I have the wrapper file in my project. Any Ideas what I’m doing wrong?
Thanks
Warren
- Warren Hansen asked 7 years ago
- last active 7 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 trying to render a column chart with multiple series. I want the two series to show side-by-side. See the reference image attachment for how I want it to look.
However, when I add a second series to a surface, the two series overlap and draw over each other, such that you can ‘t see some of the column data points.
Is there a way to draw multiple series that don’t overlap?
While I’m here, a have a couple of more questions:
• Is there a way to show more of the values on the time/date series X-axis . Notice in the SciChart column chart that is attached it shows every third value on the X-axis (Jan, April, July, October). It would be great if I could show every two, or all for each data point.
• For a time/date series X-axis, can I show a different representation of the time/date values? Specifically, I want to show, e.g.
Jan 17
rather than
01-2017
Presumably one would specify a different date formatter but I only see how to do variations of “MM-dd-yyy”. I want to show values as textual rather than numeric.
• Is there a way to extend the Y-axis to go higher?
In the SciChart column chart attachment, the Y-axis goes up to 100, but the values go higher. I would like to show the the Y-axis going up to 120.
• Is there a way to change the interval of the Y-axis?
Instead of showing every 20 values, can I show every 25 values?
Thanks.
- doughill asked 7 years ago
- last active 7 years ago
Using custom label provider I am able to format the cursor label, but still there is the name of the axis. I only want to show the value here, like “0,91” and remove the “X:” (see attached screenshots).
Thanks in advance.
override func formatCursorLabel(_ dataValue: SCIGenericType) -> String! {
return "" // super.formatCursorLabel(dataValue)
}
- Christoph Rehbichler asked 6 years ago
- last active 6 years ago
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
- Andrei Sushynski asked 7 years ago
- last active 7 years ago
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
- nadim massih asked 3 years ago
- last active 2 years ago
Hello
is there a way to set the padding (aka reduce the gap) between bars in a SCIFastColumnRenderableSeries?
I attach a screenshot of my current situation: I would like to have zero margin between columns.
I tried searching in the knowledge base but all the answers I found seem to refer to APIs not available in the iOS SDK
- SciChartSurface without paddings (https://www.scichart.com/questions/wpf/how-to-draw-a-pixel-x-millemeter)
- Reduce Chart Padding (https://www.scichart.com/questions/wpf/reduce-chart-padding)
.
There is not such class method in the iOS SDK called SciChartSurface.Padding
Thanks for your help
- Neybox Digital asked 5 years ago
- last active 5 years ago
I have a question about the font of the label text. When the screen is captured and enlarged, the character has an outline border. Is there a way to get rid of this border? Japanese Kanji font is used.
Thank you.
var yAxisLeft = new SCINumericAxis();
yAxisLeft.AxisTitle = syAxLeft;
yAxisLeft.AxisId = "Primary Y-Axis";
yAxisLeft.AxisAlignment = SCIAxisAlignment.Left;
yAxisLeft.TitleStyle = new SCIFontStyle(14, UIColor.Green);
yAxisLeft.TickLabelStyle = new SCIFontStyle(14, UIColor.Green);
yAxisLeft.DrawMajorBands = false;
yAxisLeft.DrawMinorGridLines = false;
- toshiaki tsuchiya asked 4 years ago
- last active 3 years ago
Hey guys,
Starting from 2.0 we can have dashed lines in renderable series. I was wondering can we have dashed line annotations as well?
I tried this:
verticalLineAnnotation.style.linePen = [[SCIPenDashed alloc] initWithColor:[UIColor redColor] width:2 withStrokeDashArray:@[@(10.f),@(3.f)]];
and got this build error:
Assigning to 'SCIPenStyle *' from incompatible type 'SCIPenDashed *'
Isn’t SCIPenDashed a SCIPenStyle?
Best,
Igor
- Igor Peric asked 7 years ago
- last active 7 years ago
In Android we are using initPlacementStrategy with HorizontalLineAnnotations to hide the axis label of annotation when the annotation is scrolled out of the view. So what is the equivalent way in iOS
- Manish Malviya asked 5 years ago
- last active 5 years ago
Hi,
I have an issue regarding to SCIAxisMarkerAnnotation that I could not find. Can I customise the look of it or should I implement my own axis marker? And can I add another pan gesture to annotation pin so the user can change annotation location on that axis?
Thanks,
Irmak
- Irmak Can Ozsut asked 7 years ago
- last active 5 years ago
yAxis.textFormatting = “%f”
First image file is the result of this code.
yAxis.textFormatting = “0.00000000”
Second image file is the result of this code.
First code doesn’t work, even it is just a sample code in document.
Second code works, but I want flexible trailing zeros.
How can I do?
- Minsub Kim asked 5 years ago
- last active 5 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
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
- Deryk Richardson asked 3 years ago
- last active 3 years ago
Hello
Is it possible do detect taps/selection/click over Axis Titles?
Thanks!
- Rodrigo Garcia asked 2 years ago
- last active 2 years ago
Hi, guys
Is there possibility to show tooltip by simply changing switch at the settings?
Not by tapping at the chart area as it implemented now.
Best regards,
Sushynski Andrei
- Andrei Sushynski asked 7 years ago
- last active 7 years ago
I would like to restrict the chart to cap at the extents while panning, but chart stretches at the extents. I could able to set clip mode for X axis in SCIZoomPanModifier, same way I would like to set clip mode Y axis but I couldn’t.
Please help me to restrict my chart to not move after chart data extents.
Thanks,
Vadivel Muniswamy.
- Vadivel Muniswamy asked 6 years ago
- last active 6 years ago
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.
- Lazar Nikolov asked 5 years ago
- last active 5 years ago
It seems most of the modifiers bring up tooltip data with a pan, and then it goes away when the user lifts their finger. Is there any way to bring up tooltip data with a tap (and does not go away when the finger has lifted)? The main problem that we’re trying to solve is that we would like to be able to pan to look at the chart (and don’t want an axis pan), but would also like to bring up tooltip data.
- Carolyn asked 5 years ago
- last active 5 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
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?
- Alexander Kishchak asked 3 years ago
- last active 3 years ago
Ran “pod update” this morning and got a 404 error with SciChart 4.4.0.5839 (see below)
So I changed my podspec to specify an earlier version of SciChart (4.4.0.5778) and ran update again and it was successful. This is just an FYI to report the problem, it is not blocking the team.
My environment: MacOS 12.4, Xcode 13.4, cocoapods 1.11.3
[!] Error installing SciChart
[!] /Users/mjc/opt/anaconda3/bin/curl -f -L -o /var/folders/mr/0skn4y5d1t99bcvzd09g_wdr0000gn/T/d20220713-25489-xbnbcz/file.zip https://github.com/ABTSoftware/PodSpecs/releases/download/v4.4.0.5839/SciChart_iOS_4.4.0.5839.zip –create-dirs –netrc-optional –retry 2 -A ‘CocoaPods/1.11.3 cocoapods-downloader/1.5.1’
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 9 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0
curl: (22) The requested URL returned error: 404
- Michael Chartier asked 2 years ago
- last active 2 years ago
I’m trying to create a horizontal bar chart, with bars starting at 0 point on the left then going to the right. I do this by putting the X axis at the left and the Y Axis on the bottom. However, setting the X Axis in the Left or Right area still produces a bar chart with the bars starting at 0 on the right and going left.
I thought I could make the Y Axis flipped and this might help. For example, there’s a property called ‘isAxisFlipped’ in SciAxis2D protocol. However, calling has no effect because is says the SciNumericAxis hasn’t implemented this method. I tried subclassing SciNumericAxis and overriding the isAxisFlipped method myself to return true. However, this has no effect as I don’t see this method ever getting called by anyone else.
So, is there a way to do horizontal columns/bar that go left to right?
- doughill asked 8 years ago
- last active 8 years ago
I’m trying to make a chart with a “toggle function”.
The “toggle function” what i wanted to make is this.
- enter to UIViewController which Chart is in it
- before singleTap on a chart, a chart has zoomPanModifier, XAxisDragModifier,, etc
- after make singleTap on the chart, that chart has only CursorModifier.
- 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)
- 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..?
- eunteak koh asked 6 years ago
- last active 6 years ago
I’m trying to create a Modifier for a PieChart Surface. I can not figure out how to get a segment for a point on the screen. With SciChartSurface, you can get the axis, and use its calculator to get a datapoint, or pixel point. Is there something similar in SciPieChartSurface?
- Mobile Developers asked 5 years ago
- last active 5 years ago
I want to develop a rollover in my IOS application, like the example of Using RolloverModifier. However, the axis label & tooltip display of rollover in this example is static, I want to customize a the the label & tooltip that I want, .xib file or coding to develop also fine.
Can anyone help or give suggestions to my problems? Thanks.
- Gumbo F asked 5 years ago
- last active 2 years ago
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
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?
- Sergey Evdokimov asked 3 years ago
- last active 2 months ago
The website has changed recently. I do not see any way to locate my existing support tickets. When I click on Developers–>Support it only gives me the option to create a new ticket.
- Michael Chartier asked 1 year ago
- last active 12 months ago
I will continue to this question here, but with more details. So I need to be able to drag axis annotations separately. Is there any possible way to achieve this in iOS? Basically I subclassed SCIAxisMarkerAnnotation and implemented my own -onPanGesture:At: but it does not separate instances of the class when I try to drag one of the annoation. All moves to same place. How can I detect which annotation is being dragged?
CDAxisMarkerAnnotation.h
#import <SciChart/SciChart.h>
@class CDAxisMarkerAnnotation;
@protocol CDAxisMarkerAnnotationDelegate <NSObject>
- (void)axisMarkerAnnotation:(CDAxisMarkerAnnotation *)axisMarkerAnnotation
didPanToAxisValue:(double)axisValue;
@end
@interface CDAxisMarkerAnnotation : SCIAxisMarkerAnnotation
@property (weak, nonatomic) id<CDAxisMarkerAnnotationDelegate> delegate;
@end
CDAxisMarkerAnnotation.m
#import "CDAxisMarkerAnnotation.h"
@implementation CDAxisMarkerAnnotation
- (BOOL)onPanGesture:(UIPanGestureRecognizer *)gesture At:(UIView *)view
{
if (![view isKindOfClass:[SCIChartSurfaceView class]]) {
return [super onPanGesture:gesture At:view];
}
switch (gesture.state) {
case UIGestureRecognizerStateBegan:
case UIGestureRecognizerStateChanged:
case UIGestureRecognizerStateEnded: {
CGPoint location = [gesture locationInView:view];
id<SCIRenderSurface> renderSurface = [self.parentSurface renderSurface];
CGPoint pointInChart = [renderSurface pointInChartFrame:location];
id<SCICoordinateCalculator> yCalculator = [self.yAxis getCurrentCoordinateCalculator];
double valueForYAxis = [yCalculator getDataValueFrom:pointInChart.y];
[self.delegate axisMarkerAnnotation:self didPanToAxisValue:valueForYAxis];
break;
}
default: {
break;
}
}
return YES;
}
@end
Thanks,
Irmak
- Irmak Can Ozsut asked 7 years ago
- last active 2 months ago
Hey everyone,
SCIThemeColorProvider has styling properties for individual types of chart elements (annotations, axes, grid lines, renderable series). How can multiple colours be assigned to individual RenderableSeries in case there are more than one?
For example, a stacked column chart will surely have more that one data series and it appears that current implementation of SCIThemeColorProvider doesn’t take this into account from architectural point of view.
Am I missing something?
Thanks,
Igor
- Igor Peric asked 7 years ago
- last active 7 years ago
registerVisibleRangeChangedCallback is not enough for me.
I want an active stop function like this.
surface.stopScroll()….
- Minsub Kim asked 5 years ago
- last active 5 years ago
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
- Hubert Weid asked 5 years ago
- last active 5 years ago
Hi,
i am Swift Language
=>Senario
i am plotting live ECG Data on SciChart Surface. I have added 9 Graph on Storyboard in a UIScrollView for the Following things
-ECGI
-ECGII
-ECGaVL
-ECGV
-ECGIII
-ECGaVF
-ECGaVR
-Pleth
-RESP
Each of the above has data = [Int]
i had written a custom Class for Plotting Live Data
=>Class Specification
Inherited From UIView in a seperate xib which contains
– A Label For Name of the chart,
– A chart to draw data and a label
– for displaying frame buffer speed
=>Requirement a Single Chart (Chart have no modifier added onit)
=> ISSUE
Everything Works Fine until the scroll start, On Scrolling The chart stop Plotting Data Until the Scroll stops
- Atiq Tahir asked 5 years ago
- last active 4 years ago
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
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
- Alexander Frankenhauser asked 3 years ago
- last active 1 year ago
Hi there.
It’s has been asked here:
https://www.scichart.com/questions/question/custom-annotation
So, Is it possible to draw dashed line annotation at the current version 1.2.3.982?
Best regards,
Sushynski Andrei
- Andrei Sushynski asked 7 years ago
- last active 7 years ago
I’ve downloaded yesterday showcase example from your github: https://github.com/ABTSoftware/SciChart.iOS.Examples
After providing license key other samples work ok except Audio Analyzer (and the last sales dashboard – shows blank screen).
Problems is somewhere with SpectrogramSurfaceController ( If I commend it out wave plot and fft plot works)
Xcode shows there is some bad memory access at:
[SCIFastUniformHeatMapRenderableSeries internalDrawWithContext:WithData:]
cblas_sscal
Tested using:
iPhone 5SE
iOS 11.2.5
Xcode 9.2
- Patryk Zoltowski asked 6 years ago
- last active 6 years ago
Hello,
I managed to implement a chart legend with a custom datasource (using just a SCIChartLegend object as a subview, not SCILegendModifier). However, I am unable to place the legend at specified position, it always snaps to upper-left corner of the screen. When creating a SCIChartLegend instance using the initializer that takes a Rect as a parameter, but not supplying a custom datasource, it draws correctly according to offsets specified by the supplied rect’s X and Y. It does respond to changes in the legendPosition property, but it still doesn’t allow to draw the view with any margins (which is what I’m actually trying to achieve).
- Radosław Opieńka asked 5 years ago
- last active 5 years ago
Hello.
We updated scichart to 2.5.0 version and got issue:
We have SCIAxisMarkerAnnotation with market line and set markerLinePen:
let mainDashPattern: [NSNumber] = [1.1, 1.0, 1.1, 1.0]
style.markerLinePen = SCISolidPenStyle(color: mainBlack15, withThickness: 1.0, andStrokeDash: mainDashPattern)
Sometimes, after create new chart, all lines with strokeDash colored with solid black color.
I added screenshots.
Thanks,
Alexey.
- Alexey Moshkin asked 5 years ago
- last active 4 years ago