From 386427f5fce6a4ca670351999b97a54691127665 Mon Sep 17 00:00:00 2001
From: Jah-yee <166608075+Jah-yee@users.noreply.github.com>
Date: Wed, 7 Oct 2026 13:46:47 +0800
Subject: [PATCH] fix: remove show_link argument from plotly.offline.plot()
plotly 4.2.3 removed the show_link parameter from plotly.offline.plot(),
which causes TypeError when rendering plots in QGIS DataPlotly plugin.
Remove show_link=False from all three call sites in plot_factory.py.
Fixes #468
---
DataPlotly/core/plot_factory.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/DataPlotly/core/plot_factory.py b/DataPlotly/core/plot_factory.py
index a1b8bd21..5403b037 100644
--- a/DataPlotly/core/plot_factory.py
+++ b/DataPlotly/core/plot_factory.py
@@ -865,7 +865,7 @@ def build_html(self, config) -> str:
self.POLY_FILL_PATH, self.PLOTLY_PATH)
# set some configurations
# call the plot method without all the javascript code
- raw_plot += plotly.offline.plot(fig, output_type='div', include_plotlyjs=False, show_link=False,
+ raw_plot += plotly.offline.plot(fig, output_type='div', include_plotlyjs=False,
config=config)
# insert callback for javascript events
raw_plot += self.js_callback(raw_plot)
@@ -960,7 +960,7 @@ def build_figures(self, plot_type, ptrace, config=None) -> str:
''.format(
self.POLY_FILL_PATH, self.PLOTLY_PATH)
# call the plot method without all the javascript code
- self.raw_plot += plotly.offline.plot(figures, output_type='div', include_plotlyjs=False, show_link=False,
+ self.raw_plot += plotly.offline.plot(figures, output_type='div', include_plotlyjs=False,
config=config)
# insert callback for javascript events
self.raw_plot += self.js_callback(self.raw_plot)
@@ -1018,7 +1018,7 @@ def build_sub_plots(self, grid, row, column, ptrace): # pylint:disable=too-many
''.format(
self.POLY_FILL_PATH, self.PLOTLY_PATH)
# call the plot method without all the javascript code
- self.raw_plot += plotly.offline.plot(fig, output_type='div', include_plotlyjs=False, show_link=False,
+ self.raw_plot += plotly.offline.plot(fig, output_type='div', include_plotlyjs=False,
config=config)
# insert callback for javascript events
self.raw_plot += self.js_callback(self.raw_plot)