Include Plotly js lib

This commit is contained in:
Peter Stockings
2025-02-01 21:26:52 +11:00
parent c1c4c4a960
commit fb0e1519e4
3 changed files with 10 additions and 1 deletions

8
static/js/plotly-2.35.2.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -20,6 +20,7 @@
<script src="/static/js/sweetalert2@11.js" defer></script> <script src="/static/js/sweetalert2@11.js" defer></script>
<!-- Mermaid --> <!-- Mermaid -->
<script src="/static/js/mermaid.min.js"></script> <script src="/static/js/mermaid.min.js"></script>
<script src="/static/js/plotly-2.35.2.min.js" defer></script>
<script> <script>
// Initialize Mermaid with startOnLoad set to false // Initialize Mermaid with startOnLoad set to false
mermaid.initialize({ mermaid.initialize({

View File

@@ -131,7 +131,7 @@ def generate_plot(df: pd.DataFrame, title: str) -> str:
fig = plot_funcs.get(num_columns, lambda: px.imshow(df.corr(numeric_only=True), text_auto=True, title=title))() fig = plot_funcs.get(num_columns, lambda: px.imshow(df.corr(numeric_only=True), text_auto=True, title=title))()
# Use static rendering for speed # Use static rendering for speed
return pio.to_html(fig, full_html=False, include_plotlyjs='cdn', config={'staticPlot': True}) return pio.to_html(fig, full_html=False, include_plotlyjs=False, config={'staticPlot': True})
def calculate_estimated_1rm(weight, repetitions): def calculate_estimated_1rm(weight, repetitions):