953f598b9b
Componentes React reutilizables: card, dialog, tabs, select, alert, badge, button, input, label, skeleton, tooltip, progress_bar, page_header, form_field, settings_page, crud_page, analytics_page, dashboard_layout. Charts: area, bar, line, sparkline, kpi_card, chart_container. Hooks Wails: use_wails_query, use_wails_mutation, use_wails_stream, use_wails_event, use_animated_canvas. Funciones core: cn, format_compact, chart_colors, get_series_color, wails_cache, theme_config_to_colors. Tipos: chart_series, wails_ipc, theme_config, component_variants. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
53 lines
1.5 KiB
Markdown
53 lines
1.5 KiB
Markdown
---
|
|
name: bar_chart
|
|
kind: component
|
|
lang: typescript
|
|
domain: ui
|
|
version: "1.0.0"
|
|
purity: impure
|
|
signature: "BarChart(props: BarChartProps): JSX.Element"
|
|
description: "Gráfico de barras Recharts con multi-series, orientación horizontal/vertical, tooltips temáticos y bordes redondeados."
|
|
tags: [chart, bar, visualization, recharts, component, ui]
|
|
uses_functions: [cn_typescript_core, chart_container_typescript_ui, get_series_color_typescript_core]
|
|
uses_types: [ChartSeries_typescript_ui]
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: ""
|
|
imports: [recharts]
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "frontend/functions/ui/bar_chart.tsx"
|
|
props:
|
|
- name: data
|
|
type: "Record<string, unknown>[]"
|
|
required: true
|
|
description: "Array de datos"
|
|
- name: xKey
|
|
type: "string"
|
|
required: true
|
|
description: "Key del eje X/categoría"
|
|
- name: horizontal
|
|
type: "boolean"
|
|
required: false
|
|
description: "Orientación horizontal"
|
|
- name: series
|
|
type: "Series[]"
|
|
required: false
|
|
description: "Series de datos para multi-series"
|
|
emits: []
|
|
has_state: false
|
|
framework: react
|
|
variant: [vertical, horizontal]
|
|
source_repo: "https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/Bl4cksmith/Frontend_Library"
|
|
source_license: "MIT"
|
|
source_file: "frontend/src/components/ui/charts/bar-chart.tsx"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```tsx
|
|
<BarChart data={data} xKey="category" yKey="sales" showLegend />
|
|
<BarChart data={data} xKey="name" series={series} horizontal />
|
|
```
|