import { ColumnChart } from '@/components/charts/column-chart'; import { ChartContainer } from '@/components/charts/chart-container'; import { useColor } from '@/hooks/useColor'; import React, { useState } from 'react'; import { Pressable, Text, View } from 'react-native'; const sampleData = [ { label: 'Q1 2024', value: 850 }, { label: 'Q2 2024', value: 920 }, { label: 'Q3 2024', value: 1100 }, { label: 'Q4 2024', value: 1250 }, ]; export function ColumnChartSample() { const [selectedIndex, setSelectedIndex] = useState(null); const primaryColor = useColor('primary'); const mutedColor = useColor('muted'); const enhancedData = sampleData.map((item, index) => ({ ...item, color: selectedIndex === index ? primaryColor : mutedColor, })); return ( {sampleData.map((item, index) => ( setSelectedIndex(selectedIndex === index ? null : index) } style={{ padding: 8, backgroundColor: selectedIndex === index ? primaryColor : mutedColor, borderRadius: 6, minWidth: 60, alignItems: 'center', }} > {item.label} ))} ); }