Skip to content

Commit

Permalink
figure out PlotLine
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Dec 14, 2023
1 parent 6ec04f1 commit 91ed4ac
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Plot.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 91ed4ac

Please sign in to comment.