feat: add C++ ImGui functions for core UI and visualization

Funciones C++/ImGui para dashboards (grid, panel, docking, sidebar, tabs),
visualizaciones (candlestick, gauge, histogram, pie, sparkline, heatmap,
scatter, line, bar, surface3d, kpi, table), grafos (force layout, renderer,
viewport, spatial hash, types) y utilidades (time series buffer, tracy zones,
memory/fps overlay, plot theme).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-08 00:10:18 +02:00
parent af9ebd1e0a
commit 0bdf35a461
66 changed files with 4236 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
---
name: histogram
kind: component
lang: cpp
domain: viz
version: "1.0.0"
purity: pure
signature: "void histogram(const char* title, const float* values, int count, int bins = -1)"
description: "Renderiza un histograma con bins automaticos o manuales usando ImPlot PlotHistogram dentro de un frame ImGui"
tags: [implot, chart, visualization, gpu, histogram, distribution]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [implot]
tested: false
tests: []
test_file_path: ""
file_path: "cpp/functions/viz/histogram.cpp"
framework: imgui
params:
- name: title
desc: "Titulo del histograma mostrado como cabecera del plot"
- name: values
desc: "Array de valores numericos a distribuir en bins"
- name: count
desc: "Numero de valores en el array"
- name: bins
desc: "Numero de bins. -1 = automatico via regla de Sturges (ImPlotBin_Sturges). Positivo = numero explicito de bins"
output: "Renderiza el histograma en el frame ImGui actual"
---
# histogram
Wrapper atomico sobre `ImPlot::PlotHistogram` con seleccion automatica del numero de bins.
Cuando `bins == -1` usa `ImPlotBin_Sturges`, que calcula el numero de bins como `ceil(log2(n)) + 1`. Para distribuciones con muchos valores o alta varianza puede preferirse pasar un valor explicito.
El plot usa `ImVec2(-1, 0)` para ocupar el ancho disponible con altura automatica.
Debe llamarse dentro del render callback de `fn::run_app`.