GibbsConsulting / django-plotly-dash

Expose plotly dash apps as django tags
MIT License
560 stars 125 forks source link

Cant we just have plotly_direct support multiple chart in one page #430

Open eugenewere opened 2 years ago

eugenewere commented 2 years ago

i frames are hard to style. cant we just have html direct injection onto the page Please???

delsim commented 1 year ago

The short answer is no, as each dash app assumes that it is the only one on the page, so iframes are necessary to encapsulate them.

The slightly longer answer is - what is the specific challenge you have? iframes can be made responsive, for example - and if you need to go further, then the best way forward is probably to embed your multiple charts into a single dash app and then display that using the tag of your choice.

eugenewere commented 1 year ago

i understand the problem ...i have just decided to use plotly_app. the only issue was that i had build the cards with bootstrap classes and cant appear on an iframe and also the iframe was not resizing properly on the page. " created huge blank spaces vertically even playing with ratio figures, i cant get a correct fit embedded within a card"

erdikusdemir commented 1 year ago

Currently, I experience the same problem. Did you find a solution for the problem?

I experienced either I load multiple apps with direct call and apps doesn't load because React.js tries to load libraries multiple times and crashes the program. Here is the error code I found from page inspect: @babel/polyfill/noconflic The discussion page for such a problem

or I call apps by plotly_apps tag, but then it creates complete html code for each app. This changes the style inside the dash app and bootstrap cannot arrange the size of the card automatically any more according to the dimensions of the plot.

eugenewere commented 1 year ago

@erdikusdemir Nop sorry it didnt work for me... i decided to move with just using javascript and ajax with apex charts