And probably something I wasn't thinking of too.
That might go backwards, and need to be inverted.

GraphVal = $FFFF >> (16-(((X - GraphMin) * 16) / (GraphMax - GraphMin)))

I'll test it and see.

Doh, you beat me to it.
Oops again.