Re: Graph question?
- Posted by DonCCole Oct 25, 2008
- 839 views
DerekParnell said...
DonCCole said...
Top pixel 5, Bottom pixel 265.
I want to display amounts on the graph from low 1.25847 to high 1.25863.
What would be the formula to convert from amount to pixel?
I assume you want the Y axis values.
Try this...
MinVal = 1.25847 MaxVal = 1.25863 MinY = 5 MaxY = 265 TickRatio = ((MaxVal - MinVal) / (MaxY - MinY)) Y = floor(MaxY - (Value - MinVal)/TickRatio)
Thank you Derek,
Yes I only am doing the Y axis on this graph.
This code works great.
Don Cole