Skip to content

Commit 982da35

Browse files
Copilothotlong
andcommitted
Address code review feedback: improve type safety and comments
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 240a566 commit 982da35

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/plugin-charts/src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import React, { Suspense } from 'react';
1010
import { ComponentRegistry } from '@object-ui/core';
1111
import { Skeleton } from '@object-ui/components';
12+
import type { ChartConfig } from './ChartContainerImpl';
1213

1314
// Export types for external use
1415
export type { BarChartSchema } from './types';
@@ -124,7 +125,7 @@ export const ChartRenderer: React.FC<ChartRendererProps> = ({ schema }) => {
124125
// 3. Auto-generate config/colors if missing
125126
if (!config && series) {
126127
const colors = (schema as any).colors || ['hsl(var(--chart-1))', 'hsl(var(--chart-2))', 'hsl(var(--chart-3))'];
127-
const newConfig: Record<string, any> = {};
128+
const newConfig: ChartConfig = {};
128129
series.forEach((s: any, idx: number) => {
129130
newConfig[s.dataKey] = { label: s.dataKey, color: colors[idx % colors.length] };
130131
});

packages/plugin-dashboard/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"paths": {
88
"@/*": ["src/*"]
99
},
10-
// Removed rootDir to prevent file not under rootDir errors when importing from workspace dependencies
10+
// Removed explicit rootDir to prevent file not under rootDir errors when importing from workspace dependencies
1111
"noEmit": false,
1212
"declaration": true,
1313
"composite": true,

0 commit comments

Comments
 (0)