From 91ed4ac9f3cf8928677851a38b724451ba15985e Mon Sep 17 00:00:00 2001 From: gucio321 Date: Thu, 14 Dec 2023 12:01:03 +0100 Subject: [PATCH] figure out PlotLine --- Plot.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Plot.go b/Plot.go index 4f73f563..1a5866c3 100644 --- a/Plot.go +++ b/Plot.go @@ -1,9 +1,8 @@ package giu import ( - "image" - imgui "github.com/AllenDang/cimgui-go" + "image" ) // PlotWidget is implemented by all the particular plots, which can be used @@ -400,13 +399,16 @@ func (p *LinePlot) Plot() { // 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, - //) + imgui.PlotPlotLinedoublePtrIntV( + Context.FontAtlas.RegisterString(p.title), + &p.values, + int32(len(p.values)), + p.xScale, + p.x0, + 0, // flags + int32(p.offset), + 8, // sizeof(double) = 8 + ) } // LineXYPlot adds XY plot line.