lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

Make it easy to use Lets-Plot with Panel

Open MarcSkovMadsen opened this issue 2 years ago • 6 comments

Hi Lets-Plot

A user of Panel is asking how he can use Lets-Plot with Panel to build data apps in https://github.com/holoviz/panel/issues/5475

I've investigated and found a quick, preliminary solution in https://github.com/holoviz/panel/issues/5475#issuecomment-1704336379

Based on that, it would be really nice if the Lets-Plot javascript provided

  • A way to set responsive (100%) height and width instead of specific height and width doubles.
  • An official way to clear or update the plot. Right now I just use .innerHTML="" on the parent div.

If you are interested in getting Lets-Plot supported with Panel and the combo documented in the Lets-Plot docs, then please reach out in the original Panel issue. Thanks.

https://github.com/JetBrains/lets-plot/assets/42288570/b3f9d3c0-2b47-4292-b782-8d3598ae32d9

MarcSkovMadsen avatar Sep 03 '23 15:09 MarcSkovMadsen

Hi, this sounds very interesting! Will take a look likely next week. (currently vacationing)

alshan avatar Sep 06 '23 00:09 alshan

Any updates on this? 💭

OSuwaidi avatar Sep 16 '23 11:09 OSuwaidi

Sorry, didn't have time last week. @MarcSkovMadsen its likely make sense to setup a little oss project at GitHub containing all necessary for imbedding lets-plot in a panel app - similar to streamlit-letsplot. Could you do it and seed it with your initial "LetsPlotPane" code?

A minimal sample app would be greatly handy as well. Then we could go over use cases and fix/improve this code to perfection :)

alshan avatar Sep 18 '23 00:09 alshan

Before creating a separate repository we should figure out if Panel wants to support it natively. The component strategy of Panel is different then Streamlit. Streamlit lets the community build all components with its pros and cons while Panel takes responsibility for many more components with its pros and cons.

Please join the discussion in https://github.com/holoviz/panel/issues/5475.

MarcSkovMadsen avatar Sep 18 '23 03:09 MarcSkovMadsen

@alshan Any updates regarding this issue?

OSuwaidi avatar Oct 22 '23 10:10 OSuwaidi

Nothing much, IFAIU we're waiting for Phillipps input (https://github.com/holoviz/panel/issues/5475) on my proposal above https://github.com/JetBrains/lets-plot/issues/870#issuecomment-1722710641

alshan avatar Oct 23 '23 18:10 alshan