-
+ config.theme || config.color,
+ )}
+ />
{children}
@@ -67,289 +65,105 @@ const ChartContainer = React.forwardRef<
});
ChartContainer.displayName = "Chart";
-const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
- const colorConfig = Object.entries(config).filter(
- ([_, config]) => config.theme || config.color,
- );
+// Add ChartThemeStylesProps type
+type ChartThemeStylesProps = {
+ id: string;
+ colorConfig: [string, { theme?: Record; color?: string }][];
+};
+const ChartThemeStyles = ({ id, colorConfig }: ChartThemeStylesProps) => {
if (!colorConfig.length) {
return null;
}
- return (
-