mirror of
https://github.com/hanzoai/ui.git
synced 2026-11-20 22:36:27 +00:00
- Fix gray/zinc alias confusion (gray→neutral, zinc→zen) - Consolidate duplicate gray color definition - Add finance components to ui/ directory - Clean up documentation structure - Remove test artifacts and backup files The color aliases were incorrectly mapped: Before: gray→zen, zinc→neutral (wrong) After: gray→neutral, zinc→zen (correct) This ensures Hanzo's branded 'zen' color properly maps to zinc while gray correctly references the standard neutral palette. Verified: - Production build: 544 pages ✓ - All tests passing: 219/219 ✓ - Visual verification: /colors page working ✓ - Code review: Approved ✓ Ready for deployment to ui.hanzo.ai
102 lines
2.4 KiB
Plaintext
102 lines
2.4 KiB
Plaintext
---
|
|
title: Advanced Chart
|
|
description: Full-featured TradingView chart with symbol switching and timeframes.
|
|
component: true
|
|
---
|
|
|
|
<ComponentPreview
|
|
name="advanced-chart"
|
|
description="Interactive financial chart with advanced features"
|
|
/>
|
|
|
|
## Installation
|
|
|
|
<Tabs defaultValue="cli">
|
|
|
|
<TabsList>
|
|
<TabsTrigger value="cli">CLI</TabsTrigger>
|
|
<TabsTrigger value="manual">Manual</TabsTrigger>
|
|
</TabsList>
|
|
|
|
<TabsContent value="cli">
|
|
|
|
```bash
|
|
npx @hanzo/ui@latest add advanced-chart
|
|
```
|
|
|
|
</TabsContent>
|
|
|
|
<TabsContent value="manual">
|
|
|
|
<Steps>
|
|
|
|
<Step>Install the following dependencies:</Step>
|
|
|
|
```bash
|
|
npm install @hanzo/ui
|
|
```
|
|
|
|
<Step>Copy and paste the following code into your project.</Step>
|
|
|
|
<ComponentSource name="advanced-chart" />
|
|
|
|
<Step>Update the import paths to match your project setup.</Step>
|
|
|
|
</Steps>
|
|
|
|
</TabsContent>
|
|
|
|
</Tabs>
|
|
|
|
## Usage
|
|
|
|
```tsx
|
|
import { AdvancedChart } from "@hanzo/ui/finance"
|
|
|
|
export default function Demo() {
|
|
return <AdvancedChart symbol="NASDAQ:AAPL" interval="D" theme="dark" />
|
|
}
|
|
```
|
|
|
|
## Props
|
|
|
|
| Prop | Type | Default | Description |
|
|
| --------------- | ----------------- | ------------- | ------------------------------------------ |
|
|
| symbol | string | "NASDAQ:AAPL" | Trading symbol to display |
|
|
| interval | string | "D" | Chart interval (1, 5, 15, 30, 60, D, W, M) |
|
|
| theme | "light" \| "dark" | "dark" | Color theme |
|
|
| width | string \| number | "100%" | Chart width |
|
|
| height | string \| number | 500 | Chart height |
|
|
| autosize | boolean | true | Auto-resize to container |
|
|
| hideTopToolbar | boolean | false | Hide top toolbar |
|
|
| hideSideToolbar | boolean | false | Hide side toolbar |
|
|
| saveImage | boolean | true | Enable save image |
|
|
|
|
## Examples
|
|
|
|
### Basic Usage
|
|
|
|
```tsx
|
|
<AdvancedChart symbol="NASDAQ:AAPL" />
|
|
```
|
|
|
|
### Custom Styling
|
|
|
|
```tsx
|
|
<AdvancedChart
|
|
symbol="BINANCE:BTCUSDT"
|
|
theme="light"
|
|
height={600}
|
|
hideTopToolbar={true}
|
|
/>
|
|
```
|
|
|
|
### Multiple Symbols
|
|
|
|
```tsx
|
|
<div className="grid gap-4">
|
|
<AdvancedChart symbol="NASDAQ:AAPL" />
|
|
<AdvancedChart symbol="NASDAQ:GOOGL" />
|
|
</div>
|
|
```
|