Fixed issue with vega

This commit is contained in:
George 2024-06-11 11:51:25 -03:00 committed by GitHub
parent a04e206560
commit b861b015b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@
></script> ></script>
<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 /* 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 */ this is done to enable retrieving the code again when changing theme between light/dark */
@ -35,7 +35,7 @@
backup.after(chartElement); backup.after(chartElement);
/* Embed the visualization in the container */ /* Embed the visualization in the container */
if (theme === 'dark') { if (pageTheme === 'dark') {
vegaEmbed(chartElement, JSON.parse(jsonData), { theme: 'dark' }); vegaEmbed(chartElement, JSON.parse(jsonData), { theme: 'dark' });
} else { } else {
vegaEmbed(chartElement, JSON.parse(jsonData)); vegaEmbed(chartElement, JSON.parse(jsonData));