It is necessary to increase the differences between the two columns, while maintaining the position of the text.

Given: A = 52, B = 48, C = 104. This is the height of the elements.

Elements A and B must be scaled by a factor Q so that they are visually very different, keeping the positions of point C.

That is, A2 can be equal to 74, B2 = 51, and C2 = 130. As a result, visually, A2 will appear larger than B2, and C2 will be located above B2.

enter image description here What formula can this be achieved with?


In this question it is important that the height of the column is preserved. And on the contrary, you need to scale the entire column. To show the difference between the height of columns 100 and 101.3. That is, you need to scale both A and B, plus inside the column you should also scale the relationship between A and B, plus be able to proportionally shift the coordinates of point C to where they were. A + B can be 107 or 92. This is not the number 100.

  • one
    What are the bad options in the last question? The same ru.stackoverflow.com/a/897417/243285 is enough to multiply all the related numbers with a range (100, 25) by Q and you get the same, but a little more - Serhii Dikobrazko
  • It would be nice to describe in more detail what the 100 and 25 coefficients are. It’s not completely clear how to apply it. Let's say if the input values ​​are A = 80, B = 60, then there is no need to distort the data much. - manking
  • 3
    Well, in that example, the range is 100, the percent representation, and to increase the visible difference, one-fourth is taken from it, 25. More precisely, it even turns out that we decide that we want to reduce the value if it is more than one-quarter of our range (25), if less is not changing. With other numbers, the range simply changes, in fact, their sum is 80 and 60 - 140. To scale it, it is enough to multiply all three numbers by the required multiplier. - Serhii Dikobrazko
  • In this question it is important that the height of the column is preserved. And on the contrary, you need to scale the entire column. To show the difference between the height of columns 100 and 101.3. That is, you need to scale both A and B, plus inside the column you should also scale the relationship between A and B, plus be able to proportionally shift the coordinates of point C to where they were. - manking

0