Fork me on GitHub
#portal
<
2022-03-26
>
Ben Sless18:03:03

is there a particular way I need to format data for it to be viewable with the vega viewers?

djblue18:03:29

The https://github.com/djblue/portal/blob/master/src/portal/ui/viewer/vega.cljs#L13-L17 is very minimal. However, if you want it to be the default you will need to set it via metadata {:portal.viewer/default :portal.viewer/vega}

🙌 1
djblue18:03:48

The vega-lite https://github.com/djblue/portal/blob/master/src/portal/ui/viewer/vega_lite.cljs#L7-L14 is a little more involved, but still pretty minimal. And again, for setting the default viewer {:portal.viewer/default :portal.viewer/vega-lite}

Ben Sless18:03:34

I see, so I need to format the data for vega to make sense of it

djblue18:03:14

There are also a few viewers that will translate common data patterns to vega/vega-lite for you

Ben Sless19:03:05

alright, it's starting to come together now, thanks

💯 1
Ben Sless19:03:45

grrr, my issue from 6 months ago is still open https://github.com/vega/vega/issues/3295

Ben Sless19:03:06

All I wanted was a logit scale graph 😞

Ben Sless19:03:50

I can confirm the viewers work great, though 🙂

❤️ 1
Carlo18:03:33

I never used the vega viewers, but I would start with https://github.com/djblue/portal/blob/master/src/examples/data.cljc#L98-L104

💯 1