datapane / datapane

Build and share data reports in 100% Python

Home Page:https://datapane.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Control the relative size of the columns in `dp.Group`

antopolskiy opened this issue · comments

Is it possible to control the proportions of the columns when using dp.Group with columns?

I want to create a dashboard with left and right panels and the wider middle section. Each of the side panels would up 1/5 of the screen while the middle section takes up 3/5 of the screen. The only way I was able to do something similar was create 5 columns. However, I cannot use the middle section as a single group, making in impossible to create an appealing dashboard.

Do you think it would be a good idea to create more a more advanced interface to dp.Group where we could specify not only the number of columns, but also the proportions these columns take up on the screen?

Hi @antopolskiy - thanks for raising this. Yes this is on our roadmap at https://datapane.nolt.io/20 and something we're actively working to bring about in the new year!

This has now been released within the 0.16.x release using the width parameter on dp.Group- see the docs for more info. An example is as follows,

# create 2 columns, with the dataframe taking 75% width, and the plot 25%
dp.Group(df, plot, columns=2, widths=[3,1])