-
Notifications
You must be signed in to change notification settings - Fork 19.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] able to customize the dataMax/dataMin of axis rather than fixed max/min #20770
Comments
You can pass a function to axis.min / axis.max and compute the axis boundary values from the min and max in your data. |
It's realy a good solution for simple cases. |
Another possible workaround would be to use an inviseble helper series that only contains your min and max values. Could be problematic combined with |
Yes. It's exactly the workaround i'm using for now. const invisibleSeries = {
type: 'line',
symbolSize: 0,
lineStyle: {
width: 0,
opacity: 0,
},
emphasis: {
scale: false,
disabled: true,
},
select: {
disabled: true,
},
silent: true,
animation: false,
label: {
show: false,
formatter: '',
},
tooltip: {
show: false,
formatter: '',
},
} |
What problem does this feature solve?
demo
Like this demo, the axis.max/min just change the aixs range to [min, max].
max: 1555
will change the axis max to1555
I want a dataMin/dataMax property that set the aixs range to [rounded(dataMin),rounded(dataMax)]
dataMax: 1555
will change the axis max to1800
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: