Treat Line x values as linear scale? (Timeline functionality)
See original GitHub issueIt may be that I haven’t figured out the proper combo of options and data setup, but is there a way when using @nivo/line to treat the x-axis as a number line, where the x
values are placed from low to high on the axis corresponding to their actual position, instead of being equally distributed?
The use case here is rendering a contiguous line chart with the x-axis being time with irregular values. So far, the only solution I’ve come up with is filling in my data values with copies for all missing timestamps, but that gets difficult when values don’t land evenly.
(For reference, Chartist has a decent generic implementation of this with fixedscaleaxis.js)
Thanks for the amazing library @plouc!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Line chart options | Looker - Google Cloud
Overview of visualization menu options for line charts. ... You can specify how the x-axis scale is calculated and displayed. Automatic Based on...
Read more >How to Chart Time Series: Linear vs. Logarithmic Scale - Winton
Time series are most commonly plotted on a linear scale. However logarithmic, or log, scale gives equal visual weight to equal relative ...
Read more >Line chart reference - Looker Studio Help - Google Support
Line charts based on Date or Date & Time dimensions will display gaps in the X-axis if those fields are missing data for...
Read more >Line chart | nivo
Line chart with stacking ability. Given an array of data series having an id and a nested array of points (with x, y...
Read more >Line Graphs and Irregular Intervals - Perceptual Edge
Using a line to connect values along unequal intervals of time or to connect ... X-axis is not quantitative in nature, and thus...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Implemented via #275
Hi @jlyman,
There’s no support for continuous scales on the line package, I’ve previously tried to add this functionality but without success for now, my major problem was to be able to provide the same defaults/easy to use components without introducing too much of setup.
Line
supports stacked lines via slice selection (to be able to provide the stacked tooltip for example), I must find a way to provide more low level components to cover such cases or rethink the whole package.The scatterplot package partially supports this, but I’ve coded it after the line package, so it does not provides functionality depending on a specific scale type.
I’m very concerned about this feature, it’s a limitation for many chart types, I’m currently working on improving legends support for all components, my next big thing on the project might be to fix this, probably with a bunch of BC breaks though 😃