Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for embedded Graphs in Table Cell #292

Open
hottes opened this issue Dec 10, 2018 · 3 comments
Open

Support for embedded Graphs in Table Cell #292

hottes opened this issue Dec 10, 2018 · 3 comments
Labels

Comments

@hottes
Copy link

hottes commented Dec 10, 2018

Hi,

I'm trying to embed a dash-common-component graph inside the cell of a dash-table. I have tried to generate the graph data and then adding it to the dash-table row data via:
thisrow["Results"] = dcc.Graph(id='id-1', figure=pass_percent_bar, config={'displayModeBar': False})

but this doesn't seem to work. Is there a way to embed a graph into the cell of a dash-table?
Thanks
embed

@Marc-Andre-Rivet
Copy link
Contributor

@hottes There is currently no way to embed components inside the table cells. Linking to the data types and data representation epic here: #166. You can also follow the evolution of this feature at the Dash level here: https://github.com/plotly/dash-renderer/issues/95.

@chriddyp
Copy link
Member

There are a couple of workarounds right now:

  1. For the chart above (solid blocks of color within a cell), you could implement this using custom linear-gradient styles. See the "diverging data bars" example in https://dash.plotly.com/datatable/conditional-formatting
  2. For simple spark lines, you could try using a custom sparkline font, see e.g. https://community.plotly.com/t/sparklines-as-fonts-embedding-minimal-sparklines-in-tables-components/39468
  3. You can embed arbitrary components in html.Table. You would need to embed your own sorting or filtering dropdowns in the headers of the table.
  4. You could create static images of charts and embed those images into cells with the markdown features. See https://plotly.com/python/static-image-export/

@Kirgizil
Copy link

Hi,
I have successfully implemented the markdown feature to display images in my DataTable. However, I am wondering whether someone can tell me how I can size the images I want to display in the table. Is there an option I can add here to control the height for example? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants