Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions AutoGrowth/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
import growthcurve_app
from growthcurve_app.styling import green_gradient, green_navbar, red_buttons

# set the default plotly chart config to export as svg
if not getattr(st.plotly_chart, "_svg_default", False):
_orig_plotly_chart = st.plotly_chart

def _plotly_chart(figure_or_data, *args, config=None, **kwargs):
config = {"toImageButtonOptions": {"format": "svg"}, **(config or {})}
return _orig_plotly_chart(figure_or_data, *args, config=config, **kwargs)

_plotly_chart._svg_default = True
st.plotly_chart = _plotly_chart

APP_VERSION = Path(__file__).with_name("VERSION").read_text(encoding="utf-8").strip()
PACKAGE_VERSION = growthcurve_app.__version__

Expand Down
11 changes: 11 additions & 0 deletions MicroGrowth/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
import streamlit as st
from src.styling import green_gradient, green_navbar, red_buttons

# set the default plotly chart config to export as svg
if not getattr(st.plotly_chart, "_svg_default", False):
_orig_plotly_chart = st.plotly_chart

def _plotly_chart(figure_or_data, *args, config=None, **kwargs):
config = {"toImageButtonOptions": {"format": "svg"}, **(config or {})}
return _orig_plotly_chart(figure_or_data, *args, config=config, **kwargs)

_plotly_chart._svg_default = True
st.plotly_chart = _plotly_chart

APP_VERSION = Path(__file__).with_name("VERSION").read_text(encoding="utf-8").strip()

try:
Expand Down
Loading