Skip to content
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

Allow the ability to configure tick spacing on logarithmic axes #5199

Open
gmauriello opened this issue Jan 29, 2018 · 7 comments
Open

Allow the ability to configure tick spacing on logarithmic axes #5199

gmauriello opened this issue Jan 29, 2018 · 7 comments

Comments

@gmauriello
Copy link

Hi, I have the following issue:

I have a chart with a logarithmic scale on the x axis.
But there are some point that don't have a label on the x axis.
So i changed the property StepSize (Increasing the number of steps, With the autoskip property on false), but the ticks number is still the same. How can i solve ? thanks

@etimberg
Copy link
Member

@gmauriello do you have a fiddle that reproduces this?

@gmauriello
Copy link
Author

@etimberg here it is, https://codepen.io/gmauriello/pen/MQYYrb

As you can see there are intermediate values (e.g. 25 or 15) but although the autoSkip property is set to false, i can't insert a label on the y axis for those points. In the callback function only the following values are available:

[30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]

@etimberg
Copy link
Member

Right, that's currently because the logarithmic scale only generates ticks at multiples of powers of 10. Tagging as an enhancement to add more configuration options for logarithmic scales

@etimberg etimberg changed the title Stepsize on X-axis (Logarithmic) doesn't work Allow the ability to configure tick spacing on logarithmic axes Jan 30, 2018
@gmauriello
Copy link
Author

gmauriello commented Jan 31, 2018

Besides, I also need to change the y max value for the y-axis.

I've tried to change the 'suggestedMax' property in 'ticks':
ticks: { suggestedMax: 50 }
But it doesn't work.
The only way that I've found to change the max value is to set the 'max' property in 'ticks':
ticks: { max: 50 }
but in this case, if I hide alle the datasets, the browser crashes. How can I solve ?

You can try it here: https://codepen.io/gmauriello/pen/MQYYrb

@etimberg
Copy link
Member

etimberg commented Feb 1, 2018

I believe suggestedMax only applies to linear axes

@gmauriello
Copy link
Author

@etimberg so it is not possible to set a max value for logarithmic axes ?

@etimberg
Copy link
Member

etimberg commented Feb 1, 2018

Not in the same way as linear axes. I think it should be easy to resolve though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants