Skip to content

Commit 9cf03ce

Browse files
committed
Implemented bugfix for SharedOptions serialization in Jupyter context.
1 parent 83c5d03 commit 9cf03ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

highcharts_core/utility_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,8 @@ def prep_js_for_jupyter(js_str,
527527
"""document.addEventListener('DOMContentLoaded', function() {""", '')
528528
js_str = js_str.replace('renderTo = ', '')
529529
js_str = js_str.replace(',\noptions = ', ',\n')
530-
js_str = js_str[:-3]
530+
if '.setOptions(' not in js_str:
531+
js_str = js_str[:-3]
531532

532533
if random_slug:
533534
function_str = f"""function insertChart_{random_slug}() """

0 commit comments

Comments
 (0)