Replies: 1 comment 1 reply
-
Hm. I'm the worst person for this because I never do anything outside a browser context… 😅 No, there's no serializable JSON equivalent. Could you just pass in the {marks: […], width, height} object? I don't think Plot.line needs the browser environment by itself. Also I forget if we've talked about the top-level document option?
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm adding a shorthand function to plot observable charts via
plotObservable()
but it would be nice if you could pass it the normal Plot function instead of having to wrap it in a function and pass in data. I don't think there's any way around this becausePlot
requires a browser context.It would be nicer to do something like:
@tophtucker is there anything I'm not thinking of that would output some kind of serialization / JSON spec similar to how the vega-lite-api function returns JSON in the Node environment which can then be passed into the browser to actually execute on the
document
?If I use something like
Plot.dot(gistemp, {x: "Date", y: "Anomaly"})
without calling.plot()
I get a kind of object but I doubt this can be serialized and also I believe that requiring that shorthand would only permit a subset of charts to be used.Any thoughts welcome!
Beta Was this translation helpful? Give feedback.
All reactions