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
- Brad Taber asked 5 years ago
- You must login to post comments
Hi, Brad.
Unfortunately, we can’t reproduce your issue. Take a look at the archive files I’ve attached. There is a legend with a custom legend item and it produces the following result, see screenshot.
If you still have this issue, please provide some reproducible example so we stay on the same page trying to help you.
- Andriy P answered 5 years ago
- You must login to post comments
Please login first to submit.