I am looking for a function that dynamically calculates the progresbar of a python tkinter GUI. The special thing about it is, that the values to be displayed with the percentage of the progressbar are non-linear.
- 100% should be absolut value 50
- 0% should be absolut value 2
- So the full range of the progressbar should therefore represent 48 absolut values. The problem now is, that (i.e. the half absolute value 24) should not represent the percentage value 50% but, for example, a percentage value of 74.
I get the values from an external sensor, which reads out data in real time.
How can I define this in a function that calculates the percentage values for each absolut value?
Thanks in advance!