Fixed issue with vega
This commit is contained in:
parent
a04e206560
commit
b861b015b0
|
|
@ -19,7 +19,7 @@
|
|||
></script>
|
||||
|
||||
<script>
|
||||
let theme = determineComputedTheme();
|
||||
let pageTheme = determineComputedTheme();
|
||||
|
||||
/* Create vega lite chart as another node and hide the code block, appending the vega lite node after it
|
||||
this is done to enable retrieving the code again when changing theme between light/dark */
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
backup.after(chartElement);
|
||||
|
||||
/* Embed the visualization in the container */
|
||||
if (theme === 'dark') {
|
||||
if (pageTheme === 'dark') {
|
||||
vegaEmbed(chartElement, JSON.parse(jsonData), { theme: 'dark' });
|
||||
} else {
|
||||
vegaEmbed(chartElement, JSON.parse(jsonData));
|
||||
|
|
|
|||
Loading…
Reference in New Issue