visjs / vis-timeline

📅 Create a fully customizable, interactive timelines and 2d-graphs with items and ranges.
https://visjs.github.io/vis-timeline/
Other
1.74k stars 302 forks source link

[Feature request] Is it possible to include a chart next to timeline in one visualization? #1773

Open GO5IT opened 4 months ago

GO5IT commented 4 months ago

<Timeline/Graph2D>

I wonder if it is possible to include a chart next to timeline in one visualization.

My idea is to create a "group" (in timeline) which shows a chart in which time is X axis and values in Y axis. This group is separated from other groups which show other timeline items. In this way, the timeline and chart would not mix up weirdly. I think it is great to show, for example, a line chart of GDP over time and timeline of prime ministers side by side. If it is possible, could you provide a simple code example? If it is not possible, this is my feature request. Many thanks!

GO5IT commented 3 months ago

UPDATE:

It seems 2D Graph and Timeline modules are independent, and it does not seems easy to embed 2D Graph in Timline, so my partial solution is to embed Timline items in 2D Graph. As a result, I managed to show something. It is not exactly what I wished, but compromised approach. The reason for the compromise is 2D Graph data setting is super-simple and not very configureable. It would be nice if this setting can be more customisable like we can do in Timeline module (styles, HTML embed etc). So, I keep feature request open. Thanks!

image

GO5IT commented 3 months ago

Setting for 2D Graph items:

image

Setting for TImeline items:

image

I think it is hard to deploy CSS and HTML code e.g. to change and include color, fontsize, image, hyperlink, tooltip etc. If it is possible, please share your code idea. Cheers!