Finding value on a chart - attn. Derek
- Posted by doncole2009 Jul 08, 2009
- 938 views
Derek,
You gave me the formula to find Y.
TickRatio = ((MaxVal - MinVal) / (MaxY - MinY)) Y= floor(MaxY - (Value - MinVal)/TickRatio)
That works out fine. I use it all the time for my chart I am working on.
Thank you very much.
As I forgot a lot of my high school algebra I can't figure out:
Solve for Value given the the Y.
ie...
function getY(atom Value) TickRatio = ((MaxVal - MinVal) / (MaxY - MinY)) return floor(MaxY - (Value - MinVal)/TickRatio) end function
function getValue(integer Y) TickRatio = ((MaxVal - MinVal) / (MaxY - MinY)) return ?? end function
TIA Don Cole