Skip to content

The Open Standard for Generative UI

Escape "%" in css variable generation in charts (#139)

abhithesys673424533542
diff --git a/js/packages/react-ui/package.json b/js/packages/react-ui/package.json
index 65c75dc92..ef31ffe5b 100644
--- a/js/packages/react-ui/package.json
+++ b/js/packages/react-ui/package.json
@@ -2,7 +2,7 @@
"type": "module",
"name": "@crayonai/react-ui",
"license": "MIT",
- "version": "0.7.15",
+ "version": "0.7.16",
"description": "Component library for Generative UI SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
diff --git a/js/packages/react-ui/src/components/Charts/Charts.tsx b/js/packages/react-ui/src/components/Charts/Charts.tsx
index e24d979e1..6cabbd17d 100644
--- a/js/packages/react-ui/src/components/Charts/Charts.tsx
+++ b/js/packages/react-ui/src/components/Charts/Charts.tsx
@@ -53,7 +53,7 @@ function useChart() {
}
export function keyTransform(key: string) {
- return key.replaceAll(/\s/g, "-");
+ return key.replaceAll(/\s/g, "-").replaceAll("%", "__per__");
}
/**