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 GraphicWalker events and in particular event for Chart spec change #420

Closed MarcSkovMadsen closed 1 hour ago

MarcSkovMadsen commented 2 hours ago

One thing that can really power an application up is a way to persist state such that users can share or reopen the app in the same state.

What we normally use in Panel is persisting to url query args. I would like to add this feature to panel-graphic-walker.

I would like to be able to know how to subscribe to Chart spec changes. I don't believe this is described in your api docs https://github.com/Kanaries/graphic-walker#props. Please add. Thx.

For now I will just set up an async timer that regularly updates the url.

Python

This is what I would like to enable on the Python side.

persist_spec_in_url: bool = param.Boolean(
        default=False,
        doc="""If set to True, the chart specification will be appended to the URL as a query parameter ('spec').
        This enables sharing or bookmarking a URL that directly reflects the current chart configuration. Default is False."""
    )

I plan to add this via https://github.com/panel-extensions/panel-graphic-walker/pull/27.

MarcSkovMadsen commented 1 hour ago

Ok. I've experimented. Seems simple chart specs will be too long for Edge with current limitations, so that will not be the way to go for me.