question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can’t create timeline chart using those configurations. It says React Chart Rendering... then nothing happens, no console error.

<Chart
  chartType="Timeline"
  columns={[{"id":"President","type":"string"},{"id":"Start","type":"number"},{"id":"End","type":"number"}]}
  rows={[["Washington",12,14],["Adams",12,14],["Jefferson",12,14]]}
  graph_id="ScatterChart"
  options={{"width":"600px"}}
  width={"100%"}
  chartPackage={"timeline"}
/>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rakannimercommented, Jun 17, 2016

Hey ! Thanks for reporting 😃 Regarding your problem I can see 4 issues in the code you wrote :

  1. The component expects chartPackages prop not chartPackage in order to load the packages.
  2. chartPackages expects an array not a string (we want to be able to load many packages simultaneously). So it should be chartPackages={['timeline']}
  3. The timeline chart from the Google Charts APIs needs dates not numbers so the type in the Start and End column should be date
  4. Since the type is date, the rows should have dates.

Here is a working version of your code that I ran :

<Chart chartType = "Timeline" columns = {[{"id":"President","type":"string"},{"id":"Start","type":"date"},{"id":"End","type":"date"}]} rows= {[['Washington', new Date(1789, 3, 30), new Date(1797, 2, 4)],
      ['Adams', new Date(1797, 2, 4), new Date(1801, 2, 4)],
      ['Jefferson', new Date(1801, 2, 4), new Date(1809, 2, 4)]]} options = {{}} graph_id = "TimelineChart"  width={"100%"} height={"400px"}   chartEvents={this.chartEvents} chartPackages={['timeline']}/>

This is not very clear in the examples and docs, I’ll try to make better docs when I have some free time 😃 Hope this helps, Cheers !

0reactions
del42commented, Oct 27, 2016

how would following example look like in react-google-charts? http://jsfiddle.net/asgallant/qgo310pc/1/

I can’t seem to plot this…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeline Chart Maker – 100+ stunning chart types - Vizzlo
Our free chart maker helps you create beautiful project management timelines. Online, in PowerPoint, or Google Slides. Create Timeline Chart ...
Read more >
Timelines - Office.com - Microsoft Office templates
Track or visualize your progress with PowerPoint and Excel diagram timeline templates for product roadmaps, workplans, milestones, history and more.
Read more >
What are Timeline Charts and How to Use Them?
1. Choose an event or process you’d like to represent with your timeline. 2. Collect all relevant information, such as dates, tasks, descriptions,...
Read more >
Timelines | Charts - Google Developers
A timeline is a chart that depicts how a set of resources are used over time. If you're managing a software project and...
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. The chart's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found