Skip to content

Commit fc4fecc

Browse files
committed
fix: fix chart configuration, remove redundant properties
1 parent 482b9bf commit fc4fecc

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/App.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ function App() {
623623
</Table>
624624
</div>
625625
</Card>
626+
</div>
626627
</div>
627628

628629
<div>
@@ -690,7 +691,6 @@ function App() {
690691
stroke="#10b981"
691692
strokeWidth={2}
692693
activeDot={{ r: 6 }}
693-
stackId="1"
694694
/>
695695
<Line
696696
key="exceeding"
@@ -700,7 +700,6 @@ function App() {
700700
stroke="#ef4444"
701701
strokeWidth={2}
702702
activeDot={{ r: 6 }}
703-
stackId="1"
704703
/>
705704
</LineChart>
706705
</ChartContainer>
@@ -711,7 +710,10 @@ function App() {
711710
<Separator className="mb-6" />
712711
<div className="bg-card p-4 rounded-lg border">
713712
<ChartContainer
714-
config={getModelColors()}
713+
config={Object.entries(getModelColors()).reduce((acc, [model, color]) => {
714+
acc[model] = { color };
715+
return acc;
716+
}, {} as Record<string, { color: string }>)}
715717
className="h-[500px] w-full"
716718
>
717719
<BarChart data={barChartData()}>

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import App from './App.tsx'
44
import "./main.css"
55
import "./styles/theme.css"
66
import "./index.css"
7-
import "@github/spark/spark"
7+
// @github/spark/spark import is excluded and handled externally
88

99
createRoot(document.getElementById('root')!).render(
1010
<App />

0 commit comments

Comments
 (0)