From a0ec50d2611c1524b844f59d8799ef57a9d09811 Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Sun, 17 Sep 2023 20:54:01 +0200 Subject: [PATCH] plot: apply some updates --- Plot.go | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/Plot.go b/Plot.go index 7a77a70a..01e63e3c 100644 --- a/Plot.go +++ b/Plot.go @@ -335,14 +335,16 @@ func (p *BarHPlot) Offset(offset int) *BarHPlot { // Plot implements plot interface. func (p *BarHPlot) Plot() { - // TODO: what plot does it refer to? - //imgui.PlotBarsH( - // Context.FontAtlas.RegisterString(p.title), - // p.data, - // p.height, - // p.shift, - // p.offset - // ) + imgui.PlotPlotBarsdoublePtrIntV( + Context.FontAtlas.RegisterString(p.title), + &p.data, + int32(len(p.data)), + p.height, + p.shift, + imgui.PlotErrorBarsFlagsHorizontal, + int32(p.offset), + 0, + ) } // LinePlot represents a plot line (linear chart). @@ -391,13 +393,19 @@ func (p *LinePlot) Offset(offset int) *LinePlot { // Plot implements Plot interface. func (p *LinePlot) Plot() { - // TODO: is it right function here? - //imgui.PlotSetupAxis( - // imgui.PlotAxisEnum(p.yAxis), - //) + imgui.PlotSetupAxis( + imgui.PlotAxisEnum(p.yAxis), + ) // TODO: no idea what should it be... //imgui.PlotDragLineX(Context.FontAtlas.RegisterString(p.title), p.values, p.xScale, p.x0, p.offset) + //imgui.PlotDragLineX( + // Context.FontAtlas.RegisterString(p.title), + // p.values, + // p.xScale, + // p.x0, + // p.offset, + //) } // LineXYPlot adds XY plot line.