enhanced waveform drawing with spread & margin calculations