LineChart Component
Description
The LineChart
component provides a customizable line chart using Chart.js. It supports:
- Multiple datasets
- Custom colors and grid configuration
- Smooth line interpolation
- Dual Y-axis support
- Tooltip and legend customization
Props
Prop | Type | Default | Description |
---|---|---|---|
dataset |
Record<string, any>[] |
- | Data source for the chart. |
colors |
string[] |
- | Colors for each data series. |
grid |
{ horizontal: boolean; vertical: boolean } |
{ horizontal: true, vertical: true } |
Toggles grid lines. |
xAxis |
{ scaleType: string; data: string[]; label: string }[] |
- | X-axis configuration. |
yAxis |
{ id: string; label: string }[] |
- | Y-axis configuration. |
series |
{ dataKey: string; label: string; yAxisKey?: string }[] |
- | Defines the data series to be plotted. |
Example Usage
Useful Links
🔗 GitHub Repository (Core): Liberty Core
🔗 GitHub Repository (Test Project): Liberty Test
📖 Live Documentation: Liberty Core Docs
💖 Sponsor & Support: Sponsor Liberty Core