import React from 'react'; import { IAutoVizChartType } from '../../lib/autoViz'; /** * Hand-drawn 32×32 glyphs for the Auto Viz palette. * Everything is painted with currentColor (+ opacity layers) so the icons * follow the theme in both light and dark mode. */ interface IconProps { className?: string; } const svgProps = (className?: string) => ({ viewBox: '0 0 32 32', fill: 'none', stroke: 'currentColor', strokeWidth: 1.5, strokeLinecap: 'round', strokeLinejoin: 'round', className, 'aria-hidden': true, } as const); const TableIcon: React.FC = ({ className }) => ( ); const HighlightTableIcon: React.FC = ({ className }) => ( ); const HeatmapIcon: React.FC = ({ className }) => ( {[ [6, 6, 0.2], [13.2, 6, 0.5], [20.4, 6, 0.9], [6, 13.2, 0.55], [13.2, 13.2, 0.85], [20.4, 13.2, 0.3], [6, 20.4, 0.75], [13.2, 20.4, 0.25], [20.4, 20.4, 0.6], ].map(([x, y, o], i) => ( ))} ); const BarIcon: React.FC = ({ className }) => ( ); const StackedBarIcon: React.FC = ({ className }) => ( ); const GroupedBarIcon: React.FC = ({ className }) => ( ); const LineIcon: React.FC = ({ className }) => ( {[ [5, 22], [12, 11], [19, 16], [27, 7], ].map(([cx, cy], i) => ( ))} ); const AreaIcon: React.FC = ({ className }) => ( ); const HistogramIcon: React.FC = ({ className }) => ( {[6, 10, 15, 19, 13, 7].map((h, i) => ( ))} ); const ScatterIcon: React.FC = ({ className }) => ( {[ [8, 21, 1], [11, 15, 1], [14.5, 18, 1], [17, 10, 1], [20.5, 13.5, 1], [24.5, 8, 1], [22.5, 18.5, 0.45], [9.5, 10.5, 0.45], [26, 22, 0.45], ].map(([cx, cy, o], i) => ( ))} ); const CircleViewIcon: React.FC = ({ className }) => ( {[ [9, 4], [16, 6], [23, 3], ].flatMap(([cx, n], col) => Array.from({ length: n }, (_, i) => ( )) )} ); const PieIcon: React.FC = ({ className }) => ( ); const BoxplotIcon: React.FC = ({ className }) => ( ); const PoiMapIcon: React.FC = ({ className }) => ( ); const ChoroplethMapIcon: React.FC = ({ className }) => ( ); export const chartIcons: Record> = { table: TableIcon, highlight_table: HighlightTableIcon, heatmap: HeatmapIcon, bar: BarIcon, stacked_bar: StackedBarIcon, grouped_bar: GroupedBarIcon, line: LineIcon, area: AreaIcon, histogram: HistogramIcon, scatter: ScatterIcon, circle_view: CircleViewIcon, pie: PieIcon, boxplot: BoxplotIcon, poi_map: PoiMapIcon, choropleth_map: ChoroplethMapIcon, }; /** English fallbacks; overridden by the `autoviz.charts.*` i18n keys when present */ export const chartTypeLabels: Record = { table: 'Text Table', highlight_table: 'Highlight Table', heatmap: 'Heat Map', bar: 'Bar Chart', stacked_bar: 'Stacked Bar', grouped_bar: 'Grouped Bar', line: 'Line Chart', area: 'Area Chart', histogram: 'Histogram', scatter: 'Scatter Plot', circle_view: 'Circle View', pie: 'Pie Chart', boxplot: 'Box Plot', poi_map: 'Symbol Map', choropleth_map: 'Filled Map', };