开发者

Any way to create a simple timeline with Google Charts?

开发者 https://www.devze.com 2023-03-13 09:49 出处:网络
Is there any way to create a simple timeline of events with Google Charts? (I don\'t mean an annotated timeline.)

Is there any way to create a simple timeline of events with Google Charts? (I don't mean an annotated timeline.)

In my case, I'd like to display a series of event times (not time intervals) in milliseconds, with labels, a bit like this:

| eventFoo
  | eventBar
        | eventFooBar

'            '            '
0           500         1000

I can think of ways to hack this, for example:

http://www.designinginteracti开发者_如何学Cve.com/code/how-to-build-a-gantt-chart-with-the-google-charts-api/

...but it would be nice to be able to code something like this 'natively'.


OK -- FWIW, I wound up building a JavaScript timeline implementation myself.

You can see it in action in an article I wrote about the Navigation Timing API (at the bottom of the page).

The x-axis in this case displays milliseconds, but the timeline could easily be adapted for dates. Adding tick marks to the x-axis would be somewhat complex algorithmically, but not difficult to code.

0

精彩评论

暂无评论...
验证码 换一张
取 消