Skip to content

Commit

Permalink
ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnuttandrew committed Jan 19, 2024
1 parent 389be1d commit 8fd8849
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/lib/charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,16 @@ export async function getSVG(localSpec: string, pal: Palette) {
const theme = buildTheme(pal);
let spec: any;

const cleanSpec = vegaDatasets.reduce((acc, x) => {
const breakKey = `url": "data/${x}`;
const joinKey = `url": "https://vega.github.io/editor/data/${x}`;
return acc.split(breakKey).join(joinKey);
}, localSpec);
// const cleanSpec = vegaDatasets.reduce((acc, x) => {
// const breakKey = `url": "data/${x}`;
// const joinKey = `url": "https://vega.github.io/editor/data/${x}`;
// return acc.split(breakKey).join(joinKey);
// }, localSpec);

try {
spec = JSON.parse(cleanSpec);
spec = JSON.parse(localSpec);
} catch (e) {
console.error(e, cleanSpec);
console.error(e, localSpec);
return "";
}
if (spec.$schema.includes("vega-lite")) {
Expand Down

0 comments on commit 8fd8849

Please sign in to comment.