784f2cca36
Three polish fixes spotted in the first prod screenshot of the inline event-modal waveform plot: 1. Peak labels were rendering as "PEAK 2.500E-2 IN/S" because of a blanket toExponential(3) call. New _fmtPeak() formatter picks decimal with adaptive precision for normal-range values (0.0001 to 10000) and falls back to scientific only for truly extreme magnitudes. Same value now reads "peak 0.0250 in/s". 2. Histogram events were being plotted as connected line charts, but histograms are per-INTERVAL peaks (one bar per minute, typically), not per-sample waveforms. Now: detect histogram via record_type, render as a tight bar graph (bars touch), suppress the trigger line + zero baseline overlays (no trigger event on a histogram), and label the x-axis with interval number instead of milliseconds. 3. X-axis tick labels were displaying as "11.7187040000000002 ms" because the callback used the raw float, not the formatted label. Snap to 1 decimal place (or integer for whole-number values like histogram intervals). Applied to both the inline modal plot in sfm_webapp.html and the standalone /events viewer in event_browser.html — they share the same data shape and presentation conventions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>