fix(cpp/viz,core): bell icon TI_BELL, candlestick Setup-inside-BeginPlot, pie legend, kpi sparkline a la derecha

- toast.cpp: TI_BELL en lugar de \xf0\x9f\x94\x94 (fuera del rango cargado por icon_font, renderizaba como ?)
- candlestick.cpp: SetupAxes/SetupAxisScale/SetupAxisLimits movidos dentro de BeginPlot/EndPlot — antes el plot desaparecia al entrar
- pie_chart.cpp: SetupLegend(East, Outside, NoButtons), eliminado NoLegend
- kpi_card.cpp: layout 2 cols con sparkline a la derecha centrado verticalmente
This commit is contained in:
2026-04-28 23:38:51 +02:00
parent 200e98e94c
commit a99aa661a2
4 changed files with 59 additions and 23 deletions
+5 -2
View File
@@ -52,9 +52,10 @@ void draw_pie(const char* title, const char* const* labels, const T* values,
const ImVec2 plot_size(-1.0f, height > 0.0f ? height : 200.0f);
// Legend SIEMPRE visible para que se distingan las slices por color (los
// pies suelen tener muchas categorias).
const ImPlotFlags plot_flags = plot_static::kPlotFlags
| ImPlotFlags_Equal
| ImPlotFlags_NoLegend;
| ImPlotFlags_Equal;
if (ImPlot::BeginPlot(title, plot_size, plot_flags)) {
ImPlot::SetupAxes(nullptr, nullptr,
@@ -62,6 +63,8 @@ void draw_pie(const char* title, const char* const* labels, const T* values,
plot_static::kAxisFlagsHidden);
ImPlot::SetupAxisLimits(ImAxis_X1, 0.0, 1.0, ImPlotCond_Always);
ImPlot::SetupAxisLimits(ImAxis_Y1, 0.0, 1.0, ImPlotCond_Always);
ImPlot::SetupLegend(ImPlotLocation_East,
ImPlotLegendFlags_Outside | ImPlotLegendFlags_NoButtons);
ImPlot::PlotPieChart(labels, values, count, 0.5, 0.5, outer, "%.0f", 90.0);