mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-01 00:24:20 +00:00
Compare commits
1 Commits
@shadcn/re
...
shadcn/rec
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a3a622bfe |
@@ -5,12 +5,6 @@ base: base
|
|||||||
component: true
|
component: true
|
||||||
---
|
---
|
||||||
|
|
||||||
<Callout>
|
|
||||||
|
|
||||||
**Recharts v3:** The `chart` component now targets Recharts v3. Use `ChartTooltip.defaultIndex` for initial tooltip state, but keep persistent active shapes in your own chart state. Also remove `layout` from `<Bar>` when `BarChart` already sets it, and keep a height or `min-h-*` on `ChartContainer`.
|
|
||||||
|
|
||||||
</Callout>
|
|
||||||
|
|
||||||
<ComponentPreview
|
<ComponentPreview
|
||||||
styleName="base-nova"
|
styleName="base-nova"
|
||||||
name="chart-demo"
|
name="chart-demo"
|
||||||
@@ -51,6 +45,15 @@ We do not wrap Recharts. This means you're not locked into an abstraction. When
|
|||||||
|
|
||||||
**The components are yours**.
|
**The components are yours**.
|
||||||
|
|
||||||
|
## Updating to Recharts v3
|
||||||
|
|
||||||
|
If you're upgrading existing charts from Recharts v2:
|
||||||
|
|
||||||
|
- Use `ChartTooltip.defaultIndex` for initial tooltip state.
|
||||||
|
- Keep persistent active shapes in your own React state and render them with `shape` or `activeShape`.
|
||||||
|
- Remove `layout` from `<Bar>` when `BarChart` already sets it.
|
||||||
|
- Keep a height or `min-h-*` on `ChartContainer` so the chart can measure correctly.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
<CodeTabs>
|
<CodeTabs>
|
||||||
|
|||||||
@@ -5,12 +5,6 @@ base: radix
|
|||||||
component: true
|
component: true
|
||||||
---
|
---
|
||||||
|
|
||||||
<Callout>
|
|
||||||
|
|
||||||
**Recharts v3:** The `chart` component now targets Recharts v3. Use `ChartTooltip.defaultIndex` for initial tooltip state, but keep persistent active shapes in your own chart state. Also remove `layout` from `<Bar>` when `BarChart` already sets it, and keep a height or `min-h-*` on `ChartContainer`.
|
|
||||||
|
|
||||||
</Callout>
|
|
||||||
|
|
||||||
<ComponentPreview
|
<ComponentPreview
|
||||||
styleName="radix-nova"
|
styleName="radix-nova"
|
||||||
name="chart-demo"
|
name="chart-demo"
|
||||||
@@ -51,6 +45,15 @@ We do not wrap Recharts. This means you're not locked into an abstraction. When
|
|||||||
|
|
||||||
**The components are yours**.
|
**The components are yours**.
|
||||||
|
|
||||||
|
## Updating to Recharts v3
|
||||||
|
|
||||||
|
If you're upgrading existing charts from Recharts v2:
|
||||||
|
|
||||||
|
- Use `ChartTooltip.defaultIndex` for initial tooltip state.
|
||||||
|
- Keep persistent active shapes in your own React state and render them with `shape` or `activeShape`.
|
||||||
|
- Remove `layout` from `<Bar>` when `BarChart` already sets it.
|
||||||
|
- Keep a height or `min-h-*` on `ChartContainer` so the chart can measure correctly.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
<CodeTabs>
|
<CodeTabs>
|
||||||
|
|||||||
Reference in New Issue
Block a user