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:
@@ -0,0 +1,18 @@
|
||||
#include "viz/histogram.h"
|
||||
#include "implot.h"
|
||||
|
||||
void histogram(const char* title, const float* values, int count, int bins) {
|
||||
if (ImPlot::BeginPlot(title, ImVec2(-1, 0))) {
|
||||
int b = (bins > 0) ? bins : ImPlotBin_Sturges;
|
||||
ImPlot::PlotHistogram("##data", values, count, b);
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
}
|
||||
|
||||
void histogram(const char* title, const double* values, int count, int bins) {
|
||||
if (ImPlot::BeginPlot(title, ImVec2(-1, 0))) {
|
||||
int b = (bins > 0) ? bins : ImPlotBin_Sturges;
|
||||
ImPlot::PlotHistogram("##data", values, count, b);
|
||||
ImPlot::EndPlot();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user