Skip to content

Commit

Permalink
plot: apply some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Sep 17, 2023
1 parent 51b5435 commit a0ec50d
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions Plot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a0ec50d

Please sign in to comment.