Make timeline available with x scales other than date
See original GitHub issueI’m submitting a … (check one with “x”)
[x] feature request
Current behavior
According to documentation timeline
is
Only available if x scale is date
Expected behavior
Timeline should work with x scale in numbers (linear/time?).
Reproduction of the problem
Set [timeline]="true"
and
data = [{ “name”: “Germany”, “series”: [ { “name”: 2010, “value”: 7300000 }, { “name”: 2011, “value”: 8940000 }, { “name”: “2015”, “value”: 8960000 }, ] }];
and timeline doesn’t show.
What is the motivation / use case for changing the behavior?
I would like to use timeline with my data, but since the name
values in my data are not dates but numbers (milliseconds in this case), it doesn’t work.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Display or change dates on a category axis - Microsoft Support
Expand Axis Options, and then under Axis Type, make sure Date axis is selected. Under Units, next to Base, select Days, Months, or...
Read more >Time axis: Complete timeline instead of existing data points
Hi All, When working with time & date data (e.g., date as x axis in a column chart), dates which do not exist...
Read more >How to Create Timeline Chart in Excel Quickly and Easily
Timeline chart is a type of chart that visually shows the chronological sequence of past or future events on a timescale.
Read more >How to Create a Timeline / Milestone Chart in Excel
In the Select Data Source dialogue box, click on Edit in Horizontal (Category) Axis Labels and select dates in Column E. This changes...
Read more >Customizing time and date scales in ggplot2 - R-bloggers
The choice of axis ticks and labels can make the message conveyed by a plot clearer. Oftentimes, some points in time are –...
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
This was added and released in 7.1.0
I made a fork, edited the files and ran
npm run release
but wasn’t able to include it in my project, possibly because I’m using Angular 4 with old version of ngx-graphs and the fork uses Angular 5.Using
*ngIf="timeline && scaleType != 'ordinal'"
in the template seems to work with my data, so I copied it to area charts and line chart where I could find*ngIf="timeline ...
At the moment I have no time to test it more. If it doesn’t work with yours you always have option to use
timeline=false
.I’ll make pull request.