Hello.
It’s very strange, but chart can not be zoomed with pinch, only by double tap fitting full screen.
And when trying to zoom app freezes and CPU load became 100%.
func installChart() {
sciChartSurface = SCIChartSurface(frame: self.view.bounds)
sciChartSurface?.translatesAutoresizingMaskIntoConstraints = false
self.vGraphBox.subviews.forEach({ $0.removeFromSuperview() })
self.vGraphBox.addSubview(sciChartSurface!)
NSLayoutConstraint.activate([
sciChartSurface!.leftAnchor.constraint(equalTo: self.vGraphBox.leftAnchor),
sciChartSurface!.rightAnchor.constraint(equalTo: self.vGraphBox.rightAnchor),
sciChartSurface!.bottomAnchor.constraint(equalTo: self.vGraphBox.bottomAnchor),
sciChartSurface!.topAnchor.constraint(equalTo: self.vGraphBox.topAnchor)
])
// Add the SCIChartSurface as a subview
self.vGraphBox.addSubview(sciChartSurface!)
let xAxis = SCILogarithmicNumericAxis()
xAxis.growBy = SCIDoubleRange(min: SCIGeneric(0.1), max: SCIGeneric(0.1))
xAxis.scientificNotation = .logarithmicBase
//xAxis.textFormatting = "#.#E+0"
xAxis.logarithmicBase = 10.0
xAxis.visibleRange = SCIDoubleRange(min: SCIGeneric(100), max: SCIGeneric(22000.0))
let yAxis = SCINumericAxis()
yAxis.autoRange = .never
yAxis.visibleRange = SCIDoubleRange(min: SCIGeneric(-300.0), max: SCIGeneric(0.0))
lineRenderableSeries.dataSeries = self.dataSeries
lineRenderableSeries.strokeStyle = SCISolidPenStyle(colorCode: 0xFFE13219, withThickness: 1)
//self.sciChartSurface?.chartModifiers.add(pinchZoomModifier) //Causes freeze
self.sciChartSurface?.chartModifiers.add(SCIZoomPanModifier())
self.sciChartSurface?.chartModifiers.add(SCIZoomExtentsModifier())
SCIUpdateSuspender.usingWithSuspendable(sciChartSurface!) {
self.sciChartSurface?.xAxes.add(xAxis)
self.sciChartSurface?.yAxes.add(yAxis)
self.sciChartSurface?.renderableSeries.add(self.lineRenderableSeries)
self.sciChartSurface?.renderableSeries.add(self.lineRenderableSeriesMax)
}
}
- Kirey Vadim asked 4 years ago
- last edited 4 years ago
- Hello Vadim, we can reproduce the issue on our side and we’ve created task in our bug tracker, so you can track it’s progress here – https://abtsoftware.myjetbrains.com/youtrack/issue/SCIOS-873. We will get back to you when the issued is resolved.
- Hello Nazar, thanks
- You must login to post comments
Hello Vadim,
I’m not sure if it’s going to be fixed in 2.5x soon if at all, because it’s already working well in SciChart iOS 3.x which is in BETA at the moment, so you can try it out and let us know if that works as expected.
You can get 3.x beta via the CocoaPods, as described here – https://www.scichart.com/documentation/ios/current/integrating-scichart-libraries.html#integrating-scichart-using-cocoapods
Let us know If you need any help with getting 3.x BETA version if you decided to test it.
Best Regards,
Nazar R.
SciChart Developer
- Nazar Rudnyk answered 3 years ago
- You must login to post comments
Please login first to submit.