-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layouts - (e.g., Treemap, Force-directed) #1872
Comments
We have geographic in the roadmap, but it won't be included in 2.0. |
An interesting question to think is "whether visual transforms do or do not complicate interactive selection". (I don't think we should implement complex layout transform like force, treemap, wordcloud now yet, but it's important design decision to think about going forward. So we should note this down.) Here is my current view after thinking it briefly. Feel free to comment / disagree / let me know if I overlook anything: One interesting observation is that currently selection only does reversion of scale operation to generate data queries. original data ---> transform ---> data source ---> encoding (via scale function) ---> visual value <-scale inversion for selection's data query-- Selection can be applied in filter transform, but the generation of data queries is independent from transform. I wonder if it's a fair policy to say that all pre-encoding transform ( For visualization that has (pre-encoding) layout transform e.g, treemap. There are few cases that selection seem useful:
In a way, I can't think about any case where layout transform inversion make sense. (In a way, the layout are determine by so many factors, so in most cases there is no clear inversion method anyway.) What may make more sense is to allow selection to query based on semantics (e.g., select neighbors for graphs / select children of a tree node) -- but that seems like another research project on its own. That said, this is just a quick thought and I might overlook something. Also, I haven't thought about post-encoding transform yet. Another related question is how we deal with projections, which are more similar to scales. However, projection inversion is tricky as noted in #3587.) |
Another interesting point that layout are like projection in a few ways:
One possible proposal is that, instead of treating them like transform like in Vega, layout could be a different primitive separate from transform and can generate implicit output encoding like projection. This feels a bit more like a high-level grammar (compared to having layout transforms as just normal transforms). Here are a few examples: Treemap
Wordcloud
|
Note that while this "layout" concept is not critical for implementing, we need to think this through a bit as we may want to use the keyword "layout" for composition operator's underlying layout (#3270). |
Another thought -- for wordcloud and treemap, they could even have their own composite mark. |
From a grammar perspective, one possibility is to capture all the space-filling layout under the Treemap
Partition
Unit Chart (Even for a future unit transform!)
This grammar can work even for One challenge I am facing is that currently the treemap implementation is based on hierarchical data structure. So an inbuilt stratify transform would be needed to make it work, but I am struggling to make it work even in Vega. |
I don't think layout should be combined with |
I will give it one other shot at explaining what I meant. This is just my proposal for a succinct grammar. Please disregard it, if this does not cover everything you have in plan. All visualisations which have a data transformation are inherently layouts. They just operate on different channels. It would be great to capture a large portion of them (if possible) by overloading the encoding channel, similar to what Let me illustrate with a few others not yet implemented ones which are technically also layout transforms, but can be captured by overloading the encoding channel. Density
Contour
Hex Bin
With regards to use of the With regards to hierarchical data structure, it may well require a new encoding channels for |
Hi All, Facing an issue while creating a forced directed layout graph in vega-lite. how I can implement a forced directed layout graph through vega-lite. Please guide me. Thanks in advance. |
Is it possible to add a couple of layout options other than cartesian.
The first is geographic, something a simple mercator projection that we can use latitude and longitude as
x
andy
encoding and make a dorling cartogram. Here is an example I am looking at http://narrativeviz.com/showcase/pindecode/The second is treemap, which is possible in vega - https://vega.github.io/vega-editor/?mode=vega&spec=treemap
Happy to help if you can point me in the right direction on how can start on this.
The text was updated successfully, but these errors were encountered: