Pre loader

Tag: SCIRolloverModifier

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
3k views

While moving the rollover cursor, if the number of series under the cursor increases, the rollover cursor labels become wrongly positioned. This ViewController subclass Swift example reproduces the problem.

import UIKit
import SciChart


class ViewController: UIViewController {
    // Surface is added in Storyboard
    @IBOutlet weak var surface: SCIChartSurface!
    override func viewDidLoad() {
        super.viewDidLoad()

        let xAxis = SCINumericAxis()
        let yAxis = SCINumericAxis()
        xAxis.visibleRange = SCIDoubleRange(min: 0, max: 260)
        yAxis.visibleRange = SCIDoubleRange(min: -5, max:12)
        yAxis.autoRange = .never

        self.surface.chartModifiers.add(items: SCIRolloverModifier())
        self.surface.xAxes.add(xAxis)
        self.surface.yAxes.add(yAxis)
        self.surface.renderableSeries.add(items:
            renderableSeries( 10...50, 10, .red),
            renderableSeries(150...250, 8, .green),
            renderableSeries( 10...100, 2, .cyan),
            renderableSeries(200...250, 0, .orange),
            renderableSeries( 10...250, 5, .white)
        )
    }
    func renderableSeries(_ xValues:ClosedRange<Int>, _ yValue:Double, _ color:UIColor) -> SCIFastLineRenderableSeries {
        let series = SCIXyDataSeries(xType: .double, yType: .double)
        xValues.forEach { series.append(x: $0, y: yValue ) }
        let rSeries = SCIFastLineRenderableSeries()
        rSeries.dataSeries = series
        rSeries.strokeStyle = SCISolidPenStyle(color: color, thickness: 4)
        return rSeries
    }
}
0 votes
4k views

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
0 votes
7k views

Hey again!

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

Thanks and Greeting
Benedikt

0 votes
5k views

How would I go about doing this in swift?

Showing 4 results

Try SciChart Today

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

Start TrialCase Studies