GUI Chart
App: apps/gui_chart/
Demonstrates both Nuklear chart types: an animated line chart driven by a sine wave, and a column chart with static data.
Run from root
Section titled “Run from root”% ./plume3d gui_chartWhat it shows
Section titled “What it shows”- Line chart (
type=0) — 30 data points pushed each frame fromMath.sin(_time * 2 + i * 0.4), giving a scrolling animated wave. Range:−1to1. - Column chart (
type=1) — 10 fixed values in0–100range, rendered as vertical bars. - Uses
chartBegin/chartPush/chartEndpattern — push exactlycountvalues between begin and end.
Key patterns
Section titled “Key patterns”// Animated sine waveGui.layoutRowDynamic(150, 1)if (Gui.chartBegin(0, 30, -1, 1)) { // type=0 (line), 30 points for (i in 0...30) { Gui.chartPush(Math.sin(_time * 2 + i * 0.4)) } Gui.chartEnd()}
// Static column chartif (Gui.chartBegin(1, _data.count, 0, 100)) { // type=1 (column) for (v in _data) Gui.chartPush(v) Gui.chartEnd()}