admin管理员组

文章数量:1400360

I've developed a Mac application using SciChart version 4.6.0. However, I'm encountering an issue where the Drag Modifier and RollOver Modifier lines extend beyond the chart height. This problem didn't occur with version 4.4.0. I've attached screenshots for reference.

Does anyone know how to resolve this issue?

Thanks in advance.

I tried using version 4.4.0, and it worked fine. However, I prefer to use the latest version, 4.6.0, as it supports Xcode 15 and offers more features.

This sample application is designed and developed using Swift and SwiftUI environment. And I Rendered this SciChart Using NSViewControllerRepresentable.

This is the code I used to add RollOver Modifier on the graph

SCIUpdateSuspender.usingWith(surface) {
    self.surface.xAxes.add(xAxis)
    self.surface.yAxes.add(yAxis)
    self.surface.renderableSeries.add(self.rSeries)
    self.surface.chartModifiers.add(items: SCIRolloverModifier())
}

For Drag Modifer,

SCIUpdateSuspender.usingWith(surface) {
    self.surface.chartModifiers.add(items: SCIZoomExtentsModifier(), SCIRubberBandXyZoomModifier())
}

I've developed a Mac application using SciChart version 4.6.0. However, I'm encountering an issue where the Drag Modifier and RollOver Modifier lines extend beyond the chart height. This problem didn't occur with version 4.4.0. I've attached screenshots for reference.

Does anyone know how to resolve this issue?

Thanks in advance.

I tried using version 4.4.0, and it worked fine. However, I prefer to use the latest version, 4.6.0, as it supports Xcode 15 and offers more features.

This sample application is designed and developed using Swift and SwiftUI environment. And I Rendered this SciChart Using NSViewControllerRepresentable.

This is the code I used to add RollOver Modifier on the graph

SCIUpdateSuspender.usingWith(surface) {
    self.surface.xAxes.add(xAxis)
    self.surface.yAxes.add(yAxis)
    self.surface.renderableSeries.add(self.rSeries)
    self.surface.chartModifiers.add(items: SCIRolloverModifier())
}

For Drag Modifer,

SCIUpdateSuspender.usingWith(surface) {
    self.surface.chartModifiers.add(items: SCIZoomExtentsModifier(), SCIRubberBandXyZoomModifier())
}
Share Improve this question edited Mar 25 at 3:05 HangarRash 15.1k5 gold badges20 silver badges55 bronze badges asked Mar 24 at 6:02 TommyTommy 1012 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Have you tried using clipatextents, it is hard to debug without code.

updated:

SCIUpdateSuspender.usingWith(surface) {
    self.surface.xAxes.add(xAxis)
    self.surface.yAxes.add(yAxis)
    self.surface.renderableSeries.add(self.rSeries)
    
    let rolloverModifier = SCIRolloverModifier()
    rolloverModifier.clipModeX = .clipAtExtents  // Clip horizontal lines (vertical rollover line)
    rolloverModifier.clipModeY = .clipAtExtents  // Clip vertical lines (horizontal rollover line)
    self.surface.chartModifiers.add(rolloverModifier)
}
SCIUpdateSuspender.usingWith(surface) {
    let zoomExtents = SCIZoomExtentsModifier()
    let rubberBandZoom = SCIRubberBandXyZoomModifier()
    
    rubberBandZoom.clipModeX = .clipAtExtents  // Clip rubber band horizontally
    rubberBandZoom.clipModeY = .clipAtExtents  // Clip rubber band vertically
    
    self.surface.chartModifiers.add(items: zoomExtents, rubberBandZoom)
}

本文标签: swiftSciChart Latest version 460 UI IssueStack Overflow