Edit – since posting this hack, graphs1090 has been updated to support this feature natively. Toggle the lines on and off using the Crosshair button at the top of the page. If you don’t have that button, upgrade to the latest graphs1090.
With this feature available, you may find it useful to switch all graphs to wide mode so that their vertical timestamps align. To do this, edit /etc/default/graphs1090 and set all_large=yes
I’m using graphs1090 and have all the graphs set to wide so I can compare events. To assist with this it is useful to be able to place a vertical line on the page so I can see the exact same point in time on each graph. Similarly it is often useful to be able to place a horizonal line on a graph, for example to compare performance following site changes.
I found some useful code on Stack Overflow (sorry, I did the meme ) which makes this easy. Here is the result. The intersection of the lines is where the mouse cursor was when I did the screenshot. The lines follow the mouse cursor around the whole graphs screen.
To make this work, go into /usr/share/graphs1090/html and then:
Add the SO JavaScript snippet to a new file called cursor.js
Edit portal.css and add in the SO .cursor, .vt and .hl snippets
Edit index.html and add the line <script src="cursor.js"></script> below the similar graphs.js line towards the very end of the file
Further up the file, after the line <div class="panel-body">, add in the SO HTML snippet
I suspect that doing a graphs1090 update will break this. It could also do with being limited to just the graphs area, it’s more useful when large graphs is enabled, and ideally it could do with a button at the top to toggle visbility on and off. I’m not sure how to do that or else I’d tidy it all up and issue a PR, but as it stands it’s a bit of a hack that works and can be useful when analysing the graphs.
Nice one, that’s a useful add-on. In my case I have all the graphs wide like the top one (/etc/default/graphs1090 → all_large=yes), and I wanted the line to extend down and cut through all of them so I can line up an event in one and see the result in another.
Your add-on is still handy as it’s a quick install (vs mine is a hack) and still useful to be able to use the vertical line to align part of the graph with the axis and use the horiztonal line to more finely analyse a level.
Thankyou, that’s ace. Will it extend across the entire area when activated (so that it can be used to help pick out simultaneous events in multiple graphs when they are set to large)?
Thanks for checking @jafrank, I just reverted my hack and then updated too and it’s working exactly as I want, with the button to toggle on and off and the lines covering the entire browser area, making it perfect for aligning events and exploring levels on different graphs. Thankyou @wiedehopf for the update.
How are you all updating? I’m using the ADSB.im image. I tried beta10 as well as recreating the container for ultrafeeder and didn’t get the update.
LOL before I knew this would be added so quickly to graphs1090 proper, I went ahead and added the full screen crosshairs to my TamperMoney script. You can toggle full screen crosshairs on with the extend button.
Nice one, you’ve also worked quickly to get that addon out and to update it! I edited my opening post and included a link to the update section on the graphs1090 github page.
I’ve not used TamperMonkey but I’ve seen it used a lot and it looks very useful for this kind of thing.
Since I used the dockerized version in ADSB.im, it looks like I may need to wait until the update makes it there. That’s fine. In the meantime I’ll use the Tampermonkey version