Kanaries / graphic-walker

An open source alternative to Tableau. Embeddable visual analytic
https://docs.kanaries.net/graphic-walker
Apache License 2.0
2.5k stars 134 forks source link

Document how to set initial spec #419

Open MarcSkovMadsen opened 20 hours ago

MarcSkovMadsen commented 20 hours ago

I would like to set the initial spec. The docs says

image

image

I do not understand how to use this and cannot find any examples. Please provide.

I would like to be able to use it to finalize the PR https://github.com/panel-extensions/panel-graphic-walker/pull/27.

image

MarcSkovMadsen commented 12 hours ago

Solution

My spec was from exporting the current chart. It was a dict in Python. I have to provide it as an Array in React:

<GraphicWalker
...
chart=[spec]
/>

This was not very clear for two reasons

What helped me was chart usage in https://graphic-walker.kanaries.net/examples/Graphic_Walker_In_a_Modal and chatGPT.