We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am having a hard time figuring out how to build a multiview chart in Vega using aggregated/nested.
I believe it is related to the way I am trying to transform my data to use in Vega multi view chart. Can anyone give me a hand to understand this?
I know now flatten transformation is working as debug shows
But what I get is this
This is what I would like to achieve
This is my schema to build the chart
{ "$schema": "https://vega.github.io/schema/vega/v3.json", "width": 400, "height": 200, "padding": 5, "data": [ { "name": "source", "values": { "aggregations": { "order_labels": { "buckets": [ { "key": "USD/CAD", "doc_count": 1, "orders": { "doc_count": 40, "orders_id": { "buckets": [ { "key": 5241, "doc_count": 1, "orders_price": {"value": 0.01991} }, { "key": 5242, "doc_count": 1, "orders_price": {"value": 0.02021} } ] } } }, { "key": "CAD/COD", "doc_count": 1, "orders": { "doc_count": 40, "orders_id": { "buckets": [ { "key": 5041, "doc_count": 1, "orders_price": {"value": 0.00002953} }, { "key": 5042, "doc_count": 1, "orders_price": {"value": 0.00002971} } ] } } } ] } } }, "format": {"property": "aggregations.order_labels.buckets"}, "transform": [ { "type": "flatten", "fields": ["orders.orders_id.buckets"], "as": ["orders"] } ] } ], "mark": "bar", "encoding": { "row": { "field": "orders.key", "type": "ordinal" }, "x": { "aggregate": "sum", "field": "orders.orders_price.value", "type": "quantitative", "scale": { "zero": false } }, "y": { "field": "key", "type": "ordinal", "scale": { "rangeStep": 12 } } } }
I did many things but can`t understand what is wrong with it
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am having a hard time figuring out how to build a multiview chart in Vega using aggregated/nested.
I believe it is related to the way I am trying to transform my data to use in Vega multi view chart. Can anyone give me a hand to understand this?
I know now flatten transformation is working as debug shows
But what I get is this
This is what I would like to achieve
This is my schema to build the chart
I did many things but can`t understand what is wrong with it
The text was updated successfully, but these errors were encountered: