From e4477bf40e5bde0bdbec900ecf2fc4c03609668e Mon Sep 17 00:00:00 2001 From: Florian Neukirchen Date: Sat, 3 May 2025 16:37:35 +0200 Subject: [PATCH] Fix ValueError with Plotly >= 6 by moving titlefont to title_font --- DataPlotly/core/plot_types/plot_type.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/DataPlotly/core/plot_types/plot_type.py b/DataPlotly/core/plot_types/plot_type.py index 4e0bc1f3..8a21bd6e 100644 --- a/DataPlotly/core/plot_types/plot_type.py +++ b/DataPlotly/core/plot_types/plot_type.py @@ -109,11 +109,13 @@ def create_layout(settings): legend={'orientation': settings.layout['legend_orientation']}, title=title, xaxis={ - 'title': x_title, - 'titlefont': { - "size": settings.layout.get('font_xlabel_size', 10), - "color": settings.layout.get('font_xlabel_color', "#000"), - "family": settings.layout.get('font_xlabel_family', "Arial"), + 'title': { + 'text': x_title, + 'font': { + "size": settings.layout.get('font_xlabel_size', 10), + "color": settings.layout.get('font_xlabel_color', "#000"), + "family": settings.layout.get('font_xlabel_family', "Arial"), + }, }, 'autorange': settings.layout['x_inv'], 'range': range_x, @@ -125,11 +127,13 @@ def create_layout(settings): 'gridcolor': settings.layout.get('gridcolor', '#bdbfc0') }, yaxis={ - 'title': y_title, - 'titlefont': { - "size": settings.layout.get('font_ylabel_size', 10), - "color": settings.layout.get('font_ylabel_color', "#000"), - "family": settings.layout.get('font_ylabel_family', "Arial"), + 'title': { + 'text': y_title, + 'font': { + "size": settings.layout.get('font_ylabel_size', 10), + "color": settings.layout.get('font_ylabel_color', "#000"), + "family": settings.layout.get('font_ylabel_family', "Arial"), + }, }, 'autorange': settings.layout['y_inv'], 'range': range_y,