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

ENH: Use logit instead of log for scales from 0-100% #827

Open
corneliusroemer opened this issue Jul 11, 2023 · 1 comment
Open

ENH: Use logit instead of log for scales from 0-100% #827

corneliusroemer opened this issue Jul 11, 2023 · 1 comment

Comments

@corneliusroemer
Copy link
Collaborator

Currently the plots have a log scale button, but this should really be a logit one, given that we are looking at proportions between 0-1.

image

Unfortunately this doesn't seem to be trivial with recharts as recharts doesn't have a logit scale, only log: https://recharts.org/en-US/api/YAxis#scale

I'll open an issue there.

@corneliusroemer
Copy link
Collaborator Author

Actually, this wouldn't be too hard with the custom function option, see https://recharts.org/en-US/api/YAxis#scale

import { scaleLog } from 'd3-scale';
const scale = scaleLog().base(Math.E);

...
  <YAxis scale={scale} />
...

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

No branches or pull requests

1 participant