When the y axis values are too large for example, 500,000 i would like to automatically use kilo as a prefix multiplier and display the value on the axis as 500K. Is there some algorithm that will help me choose the scaling factor based on the values plotted on the chart?
Most charting libraries are using some logic to determine what is the suitable multiplier and display accordingly as kilo, mega, etc. Is it by looking at the frequency of values (for example, 8 out of 10 values plotted are in thousands) or by just looking at the maximum and minimum?