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
Add log scale to y-axis #1202
Add log scale to y-axis #1202
Conversation
🦋 Changeset detectedLatest commit: f8619b0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for evidence-development-workspace ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
After looking at the secondary y-axis PR again (#874), I think we will need to split this out by axis. so the prop for now would be “yLogScale”, with “y2LogScale” to be added along with secondary axis |
Definitely want to be able to log independently |
You could probably call it just yLog and y2Log |
thinking: should you be able to optionally control the base of the log here? like rather than show 1, 10, 100, maybe i want to show 2,4,8,16 etc on the axes. Obviously 10 is the default. but in computing / scientific applications I think echarts has a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we might want to consider starting to use $props
or $restProps
for the charts soon to make life easier for these passthroughs
@archiewood have added your suggestions: prop is now Going to skip the x-axis log scale for now as it's slightly more involved. Will be easy enough to add in the future |
I agree in general. I think we should not make it available on stacked charts. I’ll add some error handling for that. I can see a scenario where you’d use it on a single series bar chart - e.g., plotting Covid cases with a bar per day. I think same for a single series area chart. |
@archiewood @ItsMeBrianD I think this is ready now - would be great to get a last look at it if you have a chance. I've added some error handling for multi-series stacked charts, so it'll now display "log axis cannot be used in stacked chart" |
@archiewood thanks.
|
Ok going to call it here. Some edge cases still exist, but I think they are quite small %s. |
Description
Adds a log scale to the y-axis of charts by introducing a
logScale
prop (boolean).This does not include a log scale for the x-axis.
Charts this has been added to:
Charts this has not been added to:
Possible Additions
Example
Major Questions
logScale
prop be specific to an axis (ylogScale
)?xLogScale
)y2logScale
)yType=log
,xType=log
,y2Type=log
Checklist