Closed hughess closed 7 months ago
Latest commit: f8619b028afcb9caf530dadc6d09ad97ff244cb7
The changes in this PR will be included in the next version bump.
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 ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
evidence-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 12, 2023 4:20pm |
Name | Link |
---|---|
Latest commit | |
Latest deploy log | https://app.netlify.com/sites/evidence-development-workspace/deploys/65283765b12eff5a8fdbbdff |
Deploy Preview | https://deploy-preview-1202--evidence-development-workspace.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
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 2
or 8
or e
bases are not uncommon
I think echarts has a logBase
option.
@archiewood have added your suggestions: prop is now yLog
and have added yLogBase
which defaults to 10, but can be overridden.
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
This is perhaps a side note, but certain types of charts seem poorly suited to a log scale.
Notably:
Perhaps log scales only really make sense for Line and Scatter Charts. Should be protect people from accidental traps here, or let them do what they want (there might be some valid cases I can't think of).
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"
Looking pretty good. All the min max and base stuff works as expected.
Couple of edge cases we should handle:
Is this as expected?
@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