I am developing an Android application, and I am trying to develop a chart with points, but I am struggling with some (probably) basic math.
So, the point is: I am drawing a price chart, and I know that the maximum price, being 50000€ is drawn at the 0px. At the other end, the minimum price, being 20000€ is drawn at the 800px. Now, let's suppose that I got a price between the minimum and maximum like 27500€. How can I calculate the px for that price knowing the information I gave earlier?
If someone could help me with this calculation, or at least point me in the right direction, I would really appreciate it!