vega / editor

Editor/IDE for Vega and Vega-Lite
https://vega.github.io/editor/
BSD 3-Clause "New" or "Revised" License
164 stars 88 forks source link

Data dependencies are not shown in dataflow viewer #1215

Open domoritz opened 2 years ago

domoritz commented 2 years ago

Open the Chart in the Vega Editor

Screenshot 2022-07-01 at 4 01 49 PM

I would expect to see a connection between the table and the derived data source.

domoritz commented 2 years ago

@saulshanabrook can you help fix this or explain why this connection isn't there?

saulshanabrook commented 2 years ago

Thanks for the question @domoritz.

I am looking at the dataflow now (from VEGA_DEBUG.vega.parse(VEGA_DEBUG.vegaSpec) and the data parts are currently created from inputs from different operators:

Screen Shot 2022-07-02 at 9 59 45 AM

So just from the structure of the dataflow graph, it isn't clear to me how the "derived" data set has a source of the table. It looks like the answer might be the relay operator since it connects those two?

From a quick look at the vega parser logic for the data, it does seem like it makes a relay operator when you add a source to a data set.

Currently, the dataflow viewer does not special case any of the operators to show them differently in the graph, so it treats the relay operator just like the others.

domoritz commented 2 years ago

Ah, I see. Thank you for digging into the question.

I wonder whether it would make sense to special case the direction of the edges for these operators. @jheer @arvind what do you think?