Repository: streamlit/streamlit

Issue:
Iframe embeds are not present for certain elements
After 0.85 was released, iframe embeds for `area_chart`, `bar_chart`, and `line_chart` are missing.

Latest version (no chart iframes): https://docs.streamlit.io/en/stable/api.html#streamlit.line_chart
v0.84 (shows chart iframes): https://docs.streamlit.io/en/0.84.0/api.html#display-charts


Discussion:

Resolving patch:
diff --git a/lib/streamlit/elements/arrow_altair.py b/lib/streamlit/elements/arrow_altair.py
--- a/lib/streamlit/elements/arrow_altair.py
+++ b/lib/streamlit/elements/arrow_altair.py
@@ -82,6 +82,10 @@ def _arrow_line_chart(
         ...
         >>> st._arrow_line_chart(chart_data)
 
+        .. output::
+           https://static.streamlit.io/0.50.0-td2L/index.html?id=BdxXG3MmrVBfJyqS2R2ki8
+           height: 220px
+
         """
         proto = ArrowVegaLiteChartProto()
         chart = _generate_chart(ChartType.LINE, data, width, height)
@@ -133,6 +137,10 @@ def _arrow_area_chart(
         ...
         >>> st._arrow_area_chart(chart_data)
 
+        .. output::
+           https://static.streamlit.io/0.50.0-td2L/index.html?id=Pp65STuFj65cJRDfhGh4Jt
+           height: 220px
+
         """
         proto = ArrowVegaLiteChartProto()
         chart = _generate_chart(ChartType.AREA, data, width, height)
@@ -184,6 +192,10 @@ def _arrow_bar_chart(
         ...
         >>> st._arrow_bar_chart(chart_data)
 
+        .. output::
+           https://static.streamlit.io/0.66.0-2BLtg/index.html?id=GaYDn6vxskvBUkBwsGVEaL
+           height: 220px
+
         """
         proto = ArrowVegaLiteChartProto()
         chart = _generate_chart(ChartType.BAR, data, width, height)
@@ -225,6 +237,10 @@ def _arrow_altair_chart(
         >>>
         >>> st._arrow_altair_chart(c, use_container_width=True)
 
+        .. output::
+           https://static.streamlit.io/0.25.0-2JkNY/index.html?id=8jmmXR8iKoZGV4kXaKGYV5
+           height: 200px
+
         Examples of Altair charts can be found at
         https://altair-viz.github.io/gallery/.
 
diff --git a/lib/streamlit/elements/dataframe_selector.py b/lib/streamlit/elements/dataframe_selector.py
--- a/lib/streamlit/elements/dataframe_selector.py
+++ b/lib/streamlit/elements/dataframe_selector.py
@@ -122,13 +122,13 @@ def table(self, data=None):
     def line_chart(self, data=None, width=0, height=0, use_container_width=True):
         """Display a line chart.
 
-        This is syntax-sugar around st._arrow_altair_chart. The main difference
+        This is syntax-sugar around st.altair_chart. The main difference
         is this command uses the data's own column and indices to figure out
         the chart's spec. As a result this is easier to use for many "just plot
         this" scenarios, while being less customizable.
 
-        If st._arrow_line_chart does not guess the data specification
-        correctly, try specifying your desired chart using st._arrow_altair_chart.
+        If st.line_chart does not guess the data specification
+        correctly, try specifying your desired chart using st.altair_chart.
 
         Parameters
         ----------
@@ -155,7 +155,11 @@ def line_chart(self, data=None, width=0, height=0, use_container_width=True):
         ...     np.random.randn(20, 3),
         ...     columns=['a', 'b', 'c'])
         ...
-        >>> st._arrow_line_chart(chart_data)
+        >>> st.line_chart(chart_data)
+
+        .. output::
+           https://static.streamlit.io/0.50.0-td2L/index.html?id=BdxXG3MmrVBfJyqS2R2ki8
+           height: 220px
 
         """
         if _use_arrow():
@@ -166,13 +170,13 @@ def line_chart(self, data=None, width=0, height=0, use_container_width=True):
     def area_chart(self, data=None, width=0, height=0, use_container_width=True):
         """Display an area chart.
 
-        This is just syntax-sugar around st._arrow_altair_chart. The main difference
+        This is just syntax-sugar around st.altair_chart. The main difference
         is this command uses the data's own column and indices to figure out
         the chart's spec. As a result this is easier to use for many "just plot
         this" scenarios, while being less customizable.
 
         If st.area_chart does not guess the data specification
-        correctly, try specifying your desired chart using st._arrow_altair_chart.
+        correctly, try specifying your desired chart using st.altair_chart.
 
         Parameters
         ----------
@@ -201,6 +205,10 @@ def area_chart(self, data=None, width=0, height=0, use_container_width=True):
         ...
         >>> st.area_chart(chart_data)
 
+        .. output::
+           https://static.streamlit.io/0.50.0-td2L/index.html?id=Pp65STuFj65cJRDfhGh4Jt
+           height: 220px
+
         """
         if _use_arrow():
             return self.dg._arrow_area_chart(data, width, height, use_container_width)
@@ -210,13 +218,13 @@ def area_chart(self, data=None, width=0, height=0, use_container_width=True):
     def bar_chart(self, data=None, width=0, height=0, use_container_width=True):
         """Display a bar chart.
 
-        This is just syntax-sugar around st._arrow_altair_chart. The main difference
+        This is just syntax-sugar around st.altair_chart. The main difference
         is this command uses the data's own column and indices to figure out
         the chart's spec. As a result this is easier to use for many "just plot
         this" scenarios, while being less customizable.
 
         If st.bar_chart does not guess the data specification
-        correctly, try specifying your desired chart using st._arrow_altair_chart.
+        correctly, try specifying your desired chart using st.altair_chart.
 
         Parameters
         ----------
@@ -245,6 +253,10 @@ def bar_chart(self, data=None, width=0, height=0, use_container_width=True):
         ...
         >>> st.bar_chart(chart_data)
 
+        .. output::
+           https://static.streamlit.io/0.66.0-2BLtg/index.html?id=GaYDn6vxskvBUkBwsGVEaL
+           height: 220px
+
         """
 
         if _use_arrow():
@@ -283,6 +295,10 @@ def altair_chart(self, altair_chart, use_container_width=False):
         Examples of Altair charts can be found at
         https://altair-viz.github.io/gallery/.
 
+        .. output::
+           https://static.streamlit.io/0.25.0-2JkNY/index.html?id=8jmmXR8iKoZGV4kXaKGYV5
+           height: 200px
+
         """
 
         if _use_arrow():


Test patch: