L iUdZddlmZddlZddlmZmZmZddlm Z ddl m Z ddl m ZddlmZdd lmZer dd lmZdd lmZd Zd ed<GddZ ddZy)zA Python wrapper around Bokeh.) annotationsN) TYPE_CHECKINGFinalcast)show_deprecation_warning)StreamlitAPIException) BokehChart)gather_metrics)calc_md5)Figure)DeltaGeneratorz2.4.3rST_BOKEH_VERSIONcJeZdZed d ddZeddZy) BokehMixin bokeh_chartc bddl}|jtk7r'tdtd|jdtdt d|j j }t|j}t}t|||||j jd|S) a{Display an interactive Bokeh chart. Bokeh is a charting library for Python. The arguments to this function closely follow the ones for Bokeh's ``show`` function. You can find more about Bokeh at https://bokeh.pydata.org. To show Bokeh charts in Streamlit, call ``st.bokeh_chart`` wherever you would call Bokeh's ``show``. .. Important:: You must install ``bokeh==2.4.3`` and ``numpy<2`` to use this command, which is deprecated and will be removed in a future version. For more current updates, use the |streamlit-bokeh|_ custom component instead. .. |streamlit-bokeh| replace:: ``streamlit-bokeh`` .. _streamlit-bokeh: https://github.com/streamlit/streamlit-bokeh Parameters ---------- figure : bokeh.plotting.figure.Figure A Bokeh figure to plot. use_container_width : bool Whether to override the figure's native width with the width of the parent container. If ``use_container_width`` is ``True`` (default), Streamlit sets the width of the figure to match the width of the parent container. If ``use_container_width`` is ``False``, Streamlit sets the width of the chart to fit its contents according to the plotting library, up to the width of the parent container. Example ------- >>> import streamlit as st >>> from bokeh.plotting import figure >>> >>> x = [1, 2, 3, 4, 5] >>> y = [6, 7, 2, 4, 5] >>> >>> p = figure(title="simple line example", x_axis_label="x", y_axis_label="y") >>> p.line(x, y, legend_label="Trend", line_width=2) >>> >>> st.bokeh_chart(p) .. output:: https://doc-bokeh-chart.streamlit.app/ height: 700px rNz&Streamlit only supports Bokeh version z, but you have version zG installed. Please run `pip install --force-reinstall --no-deps bokeh==z` to install the correct version. To use the latest version of Bokeh, install our custom component, [streamlit-bokeh](https://github.com/streamlit/streamlit-bokeh).zst.bokeh_chart is deprecated and will be removed in a future version. Please use our custom component, [streamlit-bokeh](https://github.com/streamlit/streamlit-bokeh), instead.r) bokeh __version__rrrdg_get_delta_path_strr encodeBokehChartProtomarshall_enqueue)selffigureuse_container_widthr delta_path element_idbokeh_chart_protos d/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/streamlit/elements/bokeh_chart.pyrzBokehMixin.bokeh_chart'sr     0 0'89I8JK((-(9(9':;G#$%ST  !  WW002 j//12 +-"F,?Lww /@AActd|S)zGet our DeltaGenerator.r )r)rs r!rz BokehMixin.dgzs$d++r"N)T)rr rboolreturnr )r%r )__name__ __module__ __qualname__r rpropertyrr"r!rr&sYM"%)PBPB"PB  PB#PBd,,r"rcpddlm}||}tj||_||_||_y)zRConstruct a Bokeh chart object. See DeltaGenerator.bokeh_chart for docs. r) json_itemN) bokeh.embedr,jsondumpsrrr)protorrrr,datas r!rrs1& V D::d#EL 3E!Er") r0rrr rr$rstrr%None)__doc__ __future__rr.typingrrrstreamlit.deprecation_utilrstreamlit.errorsrstreamlit.proto.BokehChart_pb2r rstreamlit.runtime.metrics_utilr streamlit.utilr bokeh.plotting.figurer streamlit.delta_generatorr r__annotations__rrr*r"r!r?s}%" --3H9#,8!%!W,W,t" " "" "  "r"