I have a bargraph that has a max height of 500px. This graph itself has prices ranging from $0 to $10.5 million.
I can move the bar every 1 pixel. I am trying to come up with the math to be able to move the bargraph in $1 million interments.
I’ve already tried 10500000 / 500 which yields me only 21000 which is far beyond the 500px limit.
So math gurus… what should the math be for this? :o)
cross-multiply to get:
divide to get “length of bar in pixels” by itself:
Now just plug in whatever money value you want to get a pixel value. For example, if you want the bar to be 3 million dollars,