Skip to content

Commit 168c4b0

Browse files
Copilothuangyiirene
andcommitted
Fix chart-bar component missing default color property
Added missing color default value (#8884d8) to: - defaultProps object (required by test) - input definition defaultValue (for consistency) This fixes the failing test in packages/plugin-charts/src/index.test.ts that expected color to be '#8884d8' in defaultProps. Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 88e684a commit 168c4b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/plugin-charts/src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ComponentRegistry.register(
5454
{ name: 'dataKey', type: 'string', label: 'Data Key', defaultValue: 'value' },
5555
{ name: 'xAxisKey', type: 'string', label: 'X-Axis Key', defaultValue: 'name' },
5656
{ name: 'height', type: 'number', label: 'Height', defaultValue: 400 },
57-
{ name: 'color', type: 'color', label: 'Color' },
57+
{ name: 'color', type: 'color', label: 'Color', defaultValue: '#8884d8' },
5858
],
5959
defaultProps: {
6060
data: [
@@ -67,6 +67,7 @@ ComponentRegistry.register(
6767
dataKey: 'value',
6868
xAxisKey: 'name',
6969
height: 400,
70+
color: '#8884d8',
7071
},
7172
}
7273
);

0 commit comments

Comments
 (0)