Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.14
-
None
Description
I have some use cases where none of the displayed series could have any data in a specific range of a one of the horizontal/vertical axes.
For e.g. I only display positive data with the series.
When zooming and scrolling of the chart is enabled it would be useful if these operations could respect a limitation set on the axes itself.
I am thinking about adding the following API to the QValueAxis:
- void setLowerRangeLimit(bool enabled, qreal limitValue = 0.0)
- void setLowerRangeLimit(bool enabled, qreal limitValue = 0.0)
- bool lowerRangeLimitEnabled() const;
- bool upperRangeLimitEnabled() const;
- qreal lowerRangeLimit() const;
- qreal upperRangeLimit() const;
At the moment I workarounded this issue by deriving a class from QValueAxis and keeping a list from the limited axes in my zooming/panning logic, however it could be more elegant if it would be builtin to the QValueAxis.
Please let me know what do you think about this change. If I got positive feedback I have the willingness of implementing it.