How to use observablehq to plot N line charts having shared zooming and tooltip?

75 views Asked by At

I want to mimick the functionalities of Grafana due to its limitation in ObservableHQ.

I have simulated timeseries of 100 sensors and the x starts from 0 to 300s with steps of 1. Hence, all sensors have common x. Something like below,

x     sen1 sen2 …… sen100
————————————————————
0     10.1 8.3     11.7
1     10.7 8.9     11.2
2     10.5 8.2     11.6
3     11.0 9.2     11.7
……
300   10.8 8.7     11.1

Basically I want to give a dashboard to my users where there will be a drop down with sensor names. User can select more than one sensors. On selection, the dashboard should render line charts per sensor and approximately 3 sensors per row.

Something like ObservableHQ notebook.

I want shared zooming so I can zoom on one chart and all chart zooms with it. Likewise, I want shared tooltip so I hover on one chart and I can see all charts value at that x. Observablehq does not support this yet and I am new to Observablehq or D3.js.

Can one help on achieving shared zooming and tooltip in Observablehq?

Note 1: I also want axis to be shown and the charts filling horizontal space as much as possible.

Note 2: I saw this simple timeseries but not sure how to modified this to get shared tooltip and 3 per row.

0

There are 0 answers