Hi Alex
Clamping Axis.Visiblerange
in SciChart WPF can be achieved with a VisibleRangeChanged
event handler
Take a look at Clipping the Axis.VisibleRange on Zoom and Pan
Clipping Axis.VisibleRange in Code To clip the VisibleRange and force a certain maximum or minimum, just use the following code:
axis.VisibleRangeChanged += (s, e) => { // e is VisibleRangeChangedEventArgs // Assuming axis is NumericAxis if (e.NewVisibleRange != null && e.NewVisibleRange.Min < 0) { // Force minimum visiblerange to zero always ((NumericAxis)sender).VisibleRange = new DoubleRange(0, e.NewVisibleRange.Max); } };
There are other methods in there such as using VisibleRangeLimit
but these have their limitations (no pun intended), such as not clamping when user zoom/pan occurs
- Ruslan Sabirov asked 4 years ago
- You must login to post comments
Me too,
Showing Recent Messages
Building for iOS, but linking in dylib file (/Users/macbook/Library/Developer/Xcode/DerivedData/mobile-gfxousstkcsivradewpxtuwancjj/Build/Products/Debug-iphoneos/SciChart.framework/SciChart) built for iOS Simulator, file ‘/Users/macbook/Library/Developer/Xcode/DerivedData/mobile-gfxousstkcsivradewpxtuwancjj/Build/Products/Debug-iphoneos/SciChart.framework/SciChart’ for architecture arm64.
But build for simulator is success.
Help me.
- VNDai VNDai answered 4 years ago
- last edited 4 years ago
- You must login to post comments
Please login first to submit.