MCPcopy Index your code
hub / github.com/g3n/engine / SetRangeX

Method SetRangeX

gui/chart.go:260–266  ·  view source on GitHub ↗

SetRangeX sets the X scale labels and range per step firstX is the value of first label of the x scale stepX is the step to be added to get the next x scale label countStepX is the number of elements of the data buffer for each line step

(firstX float32, stepX float32, countStepX float32)

Source from the content-addressed store, hash-verified

258// stepX is the step to be added to get the next x scale label
259// countStepX is the number of elements of the data buffer for each line step
260func (ch *Chart) SetRangeX(firstX float32, stepX float32, countStepX float32) {
261
262 ch.firstX = firstX
263 ch.stepX = stepX
264 ch.countStepX = countStepX
265 ch.updateGraphs()
266}
267
268// SetRangeY sets the minimum and maximum values of the y scale
269func (ch *Chart) SetRangeY(min float32, max float32) {

Callers 1

buildChartFunction · 0.95

Calls 1

updateGraphsMethod · 0.95

Tested by

no test coverage detected