Streamlit: Plotly broken in wide mode on 0.53

Created on 17 Jan 2020  路  1Comment  路  Source: streamlit/streamlit

Summary

Plotly graphs fail to extend in width and fill the screen in "wide mode" in 0.53. Works in 0.52.2.

Steps to reproduce

Minimal streamlit app:

import streamlit as st
import cufflinks
fig = cufflinks.datagen.lines().iplot(asFigure=True)
st.write(fig)

Check 'wide mode' in settings.

Debug info

  • Streamlit version: 0.53
  • Python version: 3.5.4
  • Plotly version: 4.4.1
  • Cufflinks version: 0.17.2
  • OS version: Windows 10 as well as Debian-based docker image
bug

Most helpful comment

Hi @everling ,

You have to pass use_container_width=True to the chart. Also this parameter isn't supported by st.write so you have to use st.plotly_chart.

Please try the following..

import streamlit as st
import cufflinks
fig = cufflinks.datagen.lines().iplot(asFigure=True)
st.plotly_chart(fig, use_container_width=True)

>All comments

Hi @everling ,

You have to pass use_container_width=True to the chart. Also this parameter isn't supported by st.write so you have to use st.plotly_chart.

Please try the following..

import streamlit as st
import cufflinks
fig = cufflinks.datagen.lines().iplot(asFigure=True)
st.plotly_chart(fig, use_container_width=True)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthew-trava picture matthew-trava  路  3Comments

imneonizer picture imneonizer  路  3Comments

niviksha picture niviksha  路  3Comments

asemic-horizon picture asemic-horizon  路  3Comments

MarcSkovMadsen picture MarcSkovMadsen  路  3Comments