Lookie what I just found.
bar = ( ( val - min ) / (max - min) ) * win );
bar: the height of your bar in pixels
val: the value of the current frequency bucket
min: the minimum possible value of a bucket
max: the maximum possible value of a bucket
win: the height of your analyser window in pixels
All the math, none of the fuss of creating it myself.