Back to Components
A line chart component for displaying trend data. Supports multiple series, area fills, and various color palettes.
설치
Import
@hua-labs/ui의 UI 컴포넌트를 @hua-labs/hua에서 통합 제공합니다.
UI 컴포넌트, 모션 훅, i18n을 하나의 패키지로 사용할 수 있습니다.
Pro 컴포넌트입니다. Pro 라이선스가 필요합니다.
라이브 데모
기본 사용법
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Approved
Rejected
With Area Fill
Jan
Feb
Mar
Apr
May
Jun
Jul
Settlement
Multiple Series
Jan
Feb
Mar
Apr
May
Jun
Jul
Revenue
Expenses
Color Palettes
approval
1
2
3
4
5
A
B
C
settlement
1
2
3
4
5
X
Y
Z
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
series* | TrendSeries[] | - | Array of series data with label, data, color, and area options |
categories* | string[] | - | Labels for the x-axis categories |
palette | "approval" | "settlement" | "custom" | "approval" | Color palette preset |
height | number | 200 | Chart height in pixels |
showLegend | boolean | true | Whether to show the legend |
showDots | boolean | true | Whether to show data points |
showTooltip | boolean | false | Whether to show tooltips on hover |
TrendSeries
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
label* | string | - | Series label for legend |
data* | number[] | - | Array of data values |
color | string | - | Custom color (hex or CSS color) |
area | boolean | false | Whether to fill the area under the line |