-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
xAxis when zooming #1655
Comments
then what is the meaning of zooming in and how can users know where they are? |
but i dont need to know where they are because when they zooming in for example my axisx is people count like : 1, 2, 3, 4, 5. Then they show 1.2, 1.4 people etc but i dont want it. |
set /// The minimum interval between axis values.
/// This can be used to avoid label duplicating when zooming in.
///
/// **default**: 1.0
open var granularity: Double
{
get
{
return _granularity
}
set
{
_granularity = newValue
// set this to `true` if it was disabled, as it makes no sense to set this property with granularity disabled
granularityEnabled = true
}
} |
but this still not show the correct label, eg my labels is 1, 2, 10, 20 , 23, 30 then if i set granularity = 2 or 1 it still display 1, 2, 3, 4, ... etc when zooming. i just want to show exactly the labels like version 2 before |
Chart 3.0 changed the way how x axis works, you have to follow the new implementation. I don't understand your question as you change it in every comment, first 100,200,300,400,500 then 1.2, 1.4 and then 1, 2, 10, 20 , 23, 30. If you want to use custom x values, then you should implement your own |
right, actually i have a array of values by timestamp, then i custom to show the date with human formatter. but the time interval is not equal for every timestamp so if i set the minimun is 1s or 10s it will show 0h00s, 0h10s, 020s 0h30s, 0h40s ... when zoom in |
yes because in Chart 2.x, it uses 'index based' for x axis, however in 3.0, x axis behaves like y axis. |
also, I would argue what is x axis - it is axis that shows static interval and grids normally; you have non-equal intervals, which should not be a good way to display in terms of x axis; the chart will be not easy to read; you can show it as values, but not x axis labels. |
how to disable auto generate label when zooming
eg my xAxis is 100,200,300,400,500 but when zoom it auto generate to 110, 120, 130 etc but i dont want it, just 100, 200, 300 , 400 , 500
The text was updated successfully, but these errors were encountered: