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
}
}
- Julian Symes asked 4 years ago
- You must login to post comments
Hi, there.
We’ve released SciChart 4.1.0 where your issue has been resolved.
You can find more details here:
https://www.scichart.com/scichart-ios-macos-sdk-v4-1-released/
Fix is available in cocoapods version ‘4.1.0.5498’ or 4.1.0 via SPM.
Please, try it and let us know the results.
Thanks in advance.
- Andriy P answered 4 years ago
- You must login to post comments
Please login first to submit.