Skip to content

Commit 97dec85

Browse files
committed
refactor(appkit-ui): remove unused recharts ChartContainer, drop recharts dep
The shadcn ChartContainer/ChartTooltip/ChartLegend/ChartStyle wrapper (src/react/ui/chart.tsx) was exported from @databricks/appkit-ui/react but unused anywhere in the repo, and it imported the entire recharts library via `import * as RechartsPrimitive`. The echarts-based components in react/charts are the charting API, so recharts can be dropped entirely. This removes dead, unused code — no shipped or used API surface changes. - delete src/react/ui/chart.tsx and its barrel re-export - remove recharts from peerDependencies and devDependencies - drop the decorative recharts chart from the drawer example - regenerate component docs (removes ChartContainer.mdx, updates examples registry) Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
1 parent 74b5b02 commit 97dec85

7 files changed

Lines changed: 1 addition & 986 deletions

File tree

docs/docs/api/appkit-ui/ui/ChartContainer.mdx

Lines changed: 0 additions & 370 deletions
This file was deleted.

docs/src/components/DocExample/examples.gen.ts

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,6 @@ export default function DonutChartExample() {
769769
770770
import * as React from "react"
771771
import { Minus, Plus } from "lucide-react"
772-
import { Bar, BarChart, ResponsiveContainer } from "recharts"
773772
774773
import {
775774
Button,
@@ -783,48 +782,6 @@ import {
783782
DrawerTrigger,
784783
} from "@databricks/appkit-ui/react"
785784
786-
const data = [
787-
{
788-
goal: 400,
789-
},
790-
{
791-
goal: 300,
792-
},
793-
{
794-
goal: 200,
795-
},
796-
{
797-
goal: 300,
798-
},
799-
{
800-
goal: 200,
801-
},
802-
{
803-
goal: 278,
804-
},
805-
{
806-
goal: 189,
807-
},
808-
{
809-
goal: 239,
810-
},
811-
{
812-
goal: 300,
813-
},
814-
{
815-
goal: 200,
816-
},
817-
{
818-
goal: 278,
819-
},
820-
{
821-
goal: 189,
822-
},
823-
{
824-
goal: 349,
825-
},
826-
]
827-
828785
export default function DrawerExample() {
829786
const [goal, setGoal] = React.useState(350)
830787
@@ -874,19 +831,6 @@ export default function DrawerExample() {
874831
<span className="sr-only">Increase</span>
875832
</Button>
876833
</div>
877-
<div className="mt-3 h-[120px]">
878-
<ResponsiveContainer width="100%" height="100%">
879-
<BarChart data={data}>
880-
<Bar
881-
dataKey="goal"
882-
style={{
883-
fill: "hsl(var(--foreground))",
884-
opacity: 0.9,
885-
}}
886-
/>
887-
</BarChart>
888-
</ResponsiveContainer>
889-
</div>
890834
</div>
891835
<DrawerFooter>
892836
<Button>Submit</Button>

packages/appkit-ui/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,13 @@
105105
},
106106
"peerDependencies": {
107107
"react": "^18.0.0 || ^19.0.0",
108-
"react-dom": "^18.0.0 || ^19.0.0",
109-
"recharts": "^2.0.0 || ^3.0.0"
108+
"react-dom": "^18.0.0 || ^19.0.0"
110109
},
111110
"devDependencies": {
112111
"@types/react": "19.2.2",
113112
"@types/react-dom": "19.2.2",
114113
"react": "19.2.0",
115114
"react-dom": "19.2.0",
116-
"recharts": "2.15.4",
117115
"tailwindcss": "4.1.17",
118116
"tw-animate-css": "1.4.0"
119117
},

0 commit comments

Comments
 (0)