import Charts from '../../../Charts/Charts'
import {
ChartType,
ChartLegendPosition,
NewNestedDataPoint,
AxisType,
LegendsChangeType,
} from '../../../Charts/types'
import {
TrendingUp,
DollarSign,
Activity,
BarChart3,
PieChart,
} from 'lucide-react'
// Helper function to generate sample chart data
const generateChartData = (): NewNestedDataPoint[] => [
{
name: 'Jan',
data: {
revenue: { primary: { label: 'Revenue', val: 4000 } },
profit: { primary: { label: 'Profit', val: 2400 } },
expenses: { primary: { label: 'Expenses', val: 1600 } },
},
},
{
name: 'Feb',
data: {
revenue: { primary: { label: 'Revenue', val: 3000 } },
profit: { primary: { label: 'Profit', val: 1398 } },
expenses: { primary: { label: 'Expenses', val: 1602 } },
},
},
{
name: 'Mar',
data: {
revenue: { primary: { label: 'Revenue', val: 2000 } },
profit: { primary: { label: 'Profit', val: 800 } },
expenses: { primary: { label: 'Expenses', val: 1200 } },
},
},
{
name: 'Apr',
data: {
revenue: { primary: { label: 'Revenue', val: 2780 } },
profit: { primary: { label: 'Profit', val: 1908 } },
expenses: { primary: { label: 'Expenses', val: 872 } },
},
},
{
name: 'May',
data: {
revenue: { primary: { label: 'Revenue', val: 1890 } },
profit: { primary: { label: 'Profit', val: 800 } },
expenses: { primary: { label: 'Expenses', val: 1090 } },
},
},
{
name: 'Jun',
data: {
revenue: { primary: { label: 'Revenue', val: 2390 } },
profit: { primary: { label: 'Profit', val: 1200 } },
expenses: { primary: { label: 'Expenses', val: 1190 } },
},
},
]
const ChartsLightHouse = () => {
const chartData = generateChartData()
return (
{/* All Chart Types */}
Monthly Financial Overview}
xAxis={{ label: 'Month', showLabel: true, show: true }}
yAxis={{
label: 'Amount ($)',
showLabel: true,
show: true,
type: AxisType.CURRENCY,
}}
/>
Sales Performance by Month}
xAxis={{ label: 'Month', showLabel: true, show: true }}
yAxis={{
label: 'Sales Volume',
showLabel: true,
show: true,
type: AxisType.NUMBER,
}}
/>
Sales Distribution}
legendPosition={ChartLegendPosition.RIGHT}
xAxis={{ show: false }}
yAxis={{ show: false }}
/>
{/* With Icons */}
Revenue Trend}
slot1={
}
slot2={
+12.5%
}
xAxis={{ label: 'Month', showLabel: true, show: true }}
yAxis={{
label: 'Amount ($)',
showLabel: true,
show: true,
type: AxisType.CURRENCY,
}}
/>
Sales Performance}
slot1={
}
xAxis={{ label: 'Month', showLabel: true, show: true }}
yAxis={{
label: 'Sales',
showLabel: true,
show: true,
type: AxisType.NUMBER,
}}
/>
Category Distribution}
slot1={
}
legendPosition={ChartLegendPosition.RIGHT}
xAxis={{ show: false }}
yAxis={{ show: false }}
/>
{/* With Stacked Legends */}
Revenue Trends}
slot1={
}
slot2={
+12.5%
}
legendPosition={ChartLegendPosition.TOP}
stackedLegends={true}
stackedLegendsData={[
{
value: 12000,
delta: 12.5,
changeType: LegendsChangeType.INCREASE,
},
{
value: 8000,
delta: 8.3,
changeType: LegendsChangeType.INCREASE,
},
{
value: 6000,
delta: 5.2,
changeType: LegendsChangeType.INCREASE,
},
]}
xAxis={{ label: 'Month', showLabel: true, show: true }}
yAxis={{
label: 'Revenue ($)',
showLabel: true,
show: true,
type: AxisType.CURRENCY,
}}
/>
{/* With Collapse Icon */}
Expandable Chart}
slot1={
}
xAxis={{ label: 'Month', showLabel: true, show: true }}
yAxis={{
label: 'Amount ($)',
showLabel: true,
show: true,
type: AxisType.CURRENCY,
}}
/>
{/* Collapsed State */}
Collapsed Chart}
xAxis={{ label: 'Month', showLabel: true, show: true }}
yAxis={{
label: 'Amount ($)',
showLabel: true,
show: true,
type: AxisType.CURRENCY,
}}
/>
{/* Legend Position Right */}
Sales by Category}
legendPosition={ChartLegendPosition.RIGHT}
xAxis={{ show: false }}
yAxis={{ show: false }}
/>
{/* All Chart Types with All Features */}
Comprehensive Line Chart}
slot1={
}
slot2={
+12.5%
}
slot3={
Last 6 months
}
legendPosition={ChartLegendPosition.TOP}
stackedLegends={true}
stackedLegendsData={[
{
value: 12000,
delta: 12.5,
changeType: LegendsChangeType.INCREASE,
},
{
value: 8000,
delta: 8.3,
changeType: LegendsChangeType.INCREASE,
},
{
value: 6000,
delta: 5.2,
changeType: LegendsChangeType.INCREASE,
},
]}
xAxis={{
label: 'Month',
showLabel: true,
show: true,
type: AxisType.DATE_TIME,
}}
yAxis={{
label: 'Amount ($)',
showLabel: true,
show: true,
type: AxisType.CURRENCY,
}}
/>
Comprehensive Bar Chart}
slot1={
}
legendPosition={ChartLegendPosition.TOP}
xAxis={{ label: 'Month', showLabel: true, show: true }}
yAxis={{
label: 'Sales',
showLabel: true,
show: true,
type: AxisType.NUMBER,
}}
/>
Comprehensive Pie Chart}
slot1={
}
legendPosition={ChartLegendPosition.RIGHT}
xAxis={{ show: false }}
yAxis={{ show: false }}
/>
)
}
export default ChartsLightHouse