Reputation: 642
Is there a Vega transform that would allow replacing a row in the input by multiple rows in the output?
In my particular use case I would like to transform the following input data
[
{"open": "2019-01-01", "close": "2021-10-11"},
{"open": "2020-22-22", "close": null}
]
into the following output:
[
{"date": "2019-01-01", "type": "open"},
{"date": "2021-10-11", "type": "close"},
{"date": "2020-22-22", "type": "open"}
]
Note how the first row of input data is morphed into two rows in the output.
Here is a stub in the Vega editor.
Upvotes: 1
Views: 284