Re: Graph question?

new topic     » goto parent     » topic index » view thread      » older message » newer message
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) 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu