Hacker News new | ask | show | jobs
by aleda145 21 days ago
Have you started looking into different layout patterns? For kavla.dev (my SQL canvas) I'm exploring sugiyama (https://en.wikipedia.org/wiki/Layered_graph_drawing)

I like it, but I feel like there might be something I'm missing

2 comments

I have actually spent a lot of time on this. But it was for an old version of my flowchart editor that did full relayout on every edit. I tried many variations, including a fork I made of dagrejs to shoehorn it into discrete coordinates.

In the end I decided to go a different route. The current version only does incremental relayout — it tries to move only a small number of nodes to make space for the current edit. And I wrote a custom algorithm that shifts nodes out of the way to make space on edits, and trys best effort to keep edges in the same direction by detecting which got bent and iteratively moving one of their nodes.

Smart! I've found that the UX is awful when nodes jump around too much, your approach is much better!
Also, I really like the design of your site. Very fun. What sets your product apart from other visual sql tools?
So far I don't think very much, except for it being a canvas and pasting images.

But I want this to become a "Bicycle for the mind" for data analysis, where you can move data by different gestures. Like circling an area in a scatter plot to examine those points, or dragging a bar from a bar chart onto the canvas.

My thesis is that humans are better than agents at pattern recognition, so I want to optimize for the "looking at data" part of analytics and make it as easy as and intuitive as possible