From 9cf03cedbfed7139fe188c50ceb275d36259aa7d Mon Sep 17 00:00:00 2001 From: Chris Modzelewski Date: Sat, 6 Apr 2024 17:51:19 -0400 Subject: [PATCH] Implemented bugfix for SharedOptions serialization in Jupyter context. --- highcharts_core/utility_functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/highcharts_core/utility_functions.py b/highcharts_core/utility_functions.py index e0d1006..a347b16 100644 --- a/highcharts_core/utility_functions.py +++ b/highcharts_core/utility_functions.py @@ -527,7 +527,8 @@ def prep_js_for_jupyter(js_str, """document.addEventListener('DOMContentLoaded', function() {""", '') js_str = js_str.replace('renderTo = ', '') js_str = js_str.replace(',\noptions = ', ',\n') - js_str = js_str[:-3] + if '.setOptions(' not in js_str: + js_str = js_str[:-3] if random_slug: function_str = f"""function insertChart_{random_slug}() """