Live data from Hacker News

Show HN: Interactive graphs in Rerun with a Rust port of D3-force

rerun.io

1–10 of 14 posts

Show HN: Interactive graphs in Rerun with a Rust port of D3-force

#1
Rerun 0.21 comes with a new graph viewer that's written in Rust and runs in the browser via wasm. It's powered by a new force based layout engine that is a port of much of d3-force to Rust. (The release also contains some other cool stuff like undo/redo implemented on top of a timeseries DB.)

We built this with applications in robotics and spatial computing in mind but would love to hear feedback from folks that would see this as useful in other domains as well.

Show HN: Interactive graphs in Rerun with a Rust port of D3-force
rerun.io

Re: Show HN: Interactive graphs in Rerun with a Rust port of D3-force

#4
post #3

This is pretty awesome. I especially liked replaying the graph layout. I do wonder what kind of native GUI toolkits whis would work with (since I don’t really care much for web UIs and browser overhead).

There is a native version as well: https://rerun.io/docs/getting-started/installing-viewer

You can for instance install and open the viewer natively with just:

> pip install rerun-sdk

> rerun

Re: Show HN: Interactive graphs in Rerun with a Rust port of D3-force

#5

Hi, Jochen from Rerun here (@grtlr on GitHub)! I implemented most of the graph view, including Fjädra [0], our Rust port of the excellent d3-force [1]. Happy to answer any questions! [0]( https://github.com/grtlr/fjadra ) [1]( https://d3js.org/d3-force )

Is there a public way to add custom Blueprints (https://rerun.io/docs/concepts/blueprint) and Visualizers (https://rerun.io/docs/concepts/visualizers-and-overrides)? It looks like yes for Blueprints, reading through https://rerun.io/examples. I am guessing "not yet" for Visualizers? For example, I'd like to be able to render a Sankey diagram from a "dataflows" Blueprint through the Viewer (https://rerun.io/viewer). I realize that non-spatial is not Rerun's focus.

Re: Show HN: Interactive graphs in Rerun with a Rust port of D3-force

#6

Hi, Jochen from Rerun here (@grtlr on GitHub)! I implemented most of the graph view, including Fjädra [0], our Rust port of the excellent d3-force [1]. Happy to answer any questions! [0]( https://github.com/grtlr/fjadra ) [1]( https://d3js.org/d3-force )

Is there a public way to add custom Blueprints ( https://rerun.io/docs/concepts/blueprint ) and Visualizers ( https://rerun.io/docs/concepts/visualizers-and-overrides )? It looks like yes for Blueprints, reading through https://rerun.io/examples . I am guessing "not yet" for Visualizers? For example, I'd like to be able to render a Sankey diagram from a "dataflows" Blueprint through the Viewer ( https://rerun.io/view…

Custom visualizers are also supported—in fact the graph view started out as an external visualizer.

Here is a tutorial: https://rerun.io/docs/howto/visualization/extend-ui#custom-v...

And here is the corresponding code example: https://github.com/rerun-io/rerun/tree/main/examples/rust/cu...

To write your own graph visualization, you can look into the implementation of our graph view: https://github.com/rerun-io/rerun/tree/main/crates/viewer/re...

In the future we want to provide more types of layouts, dataflow is high up on that list. May I ask what kind of data you want to visualize? Since you mentioned Sankeys, in your case does the structure of the Sankey change as well, or do you only expect the edges to grow/shrink over time?

Re: Show HN: Interactive graphs in Rerun with a Rust port of D3-force

#7

Earlier quoted context omitted.

Is there a public way to add custom Blueprints ( https://rerun.io/docs/concepts/blueprint ) and Visualizers ( https://rerun.io/docs/concepts/visualizers-and-overrides )? It looks like yes for Blueprints, reading through https://rerun.io/examples . I am guessing "not yet" for Visualizers? For example, I'd like to be able to render a Sankey diagram from a "dataflows" Blueprint through the Viewer ( https://rerun.io/view…

Custom visualizers are also supported—in fact the graph view started out as an external visualizer. Here is a tutorial: https://rerun.io/docs/howto/visualization/extend-ui#custom-v... And here is the corresponding code example: https://github.com/rerun-io/rerun/tree/main/examples/rust/cu... To write your own graph visualization, you can look into the implementation of our graph view: https://github.com/rerun-io/rerun…

Thank you for your reply. I am thinking about variable dataflows through a fixed set of nodes -- so, the latter, growing and shrinking edges. The application would be visualizing system dynamics. The stages in the Sankey would be organized by degree of distance from an "intervention" node.

Re: Show HN: Interactive graphs in Rerun with a Rust port of D3-force

#8

Earlier quoted context omitted.

Custom visualizers are also supported—in fact the graph view started out as an external visualizer. Here is a tutorial: https://rerun.io/docs/howto/visualization/extend-ui#custom-v... And here is the corresponding code example: https://github.com/rerun-io/rerun/tree/main/examples/rust/cu... To write your own graph visualization, you can look into the implementation of our graph view: https://github.com/rerun-io/rerun…

Thank you for your reply. I am thinking about variable dataflows through a fixed set of nodes -- so, the latter, growing and shrinking edges. The application would be visualizing system dynamics. The stages in the Sankey would be organized by degree of distance from an "intervention" node.

That's very interesting! We're currently working on the plumbing to be able to assign attributes to edges as well—right now it's only possible to style/configure the nodes.

Once we have that though, there is another approach that you can take before you go down the path of writing your own visualizer/view: you can also log custom positions for each node. Since the node positions don't change in your case that might get you quite far by statically logging the nodes with a Sankey layout computed by your application.

Re: Show HN: Interactive graphs in Rerun with a Rust port of D3-force

#9
Have been playing with rerun since the early days, and the team has built a ton of amazing features for visualizing your robotics datasets. I used it on a bicyclist safety system to ingest raw data for playback and analysis later.

I especially like that they're also building an (amazing) Rust version of imgui called egui, and open sourcing all the work for the ecosystem: https://github.com/emilk/egui

Re: Show HN: Interactive graphs in Rerun with a Rust port of D3-force

#10
I've been using rerun for a while to visualize the content of inference pipelines, it's nothing short of amazing!

I really wanted live views of my gstreamer pipelines, so I've started to write a tool with egui [0]. Looks like rerun's GraphView doesn't support subgraphs and horizontal layouts yet, but I'm sure I'll soon be able to just have a gstreamer tracer that pushes reruns logs. That's better than having to find the motivation to go through my todo list! Yeah!

[0] https://github.com/simgt/glitch

Post reply on HN