Hello,
I am writing my own charting components in Vb.net 2010 and am wondering if anyone has good suggestions for a way to format axis tick labels (espeically large and small numbers) with a fixed number of characters (eg 6) so that the space needed for the axis is compact.
The best I have come up with is (might need to use a fixed character width font, which has its drawbacks):
I don't really like scientific notation as 3-4 characters are lost for the exponent, so you lose sigificant figures. Any better suggestions than the one above would be much appreciated. Also is someone able to suggest an elegant way to do the formatting for the numbers as shown above without using a large Select Case block?
thank you
I am writing my own charting components in Vb.net 2010 and am wondering if anyone has good suggestions for a way to format axis tick labels (espeically large and small numbers) with a fixed number of characters (eg 6) so that the space needed for the axis is compact.
The best I have come up with is (might need to use a fixed character width font, which has its drawbacks):
1 | 1.0000 |
100 | 100.00 |
10,000 | 10.00k |
1,000,000 | 1.000M |
0.001 | 1.000m |
0.000001 | 1.000u |
I don't really like scientific notation as 3-4 characters are lost for the exponent, so you lose sigificant figures. Any better suggestions than the one above would be much appreciated. Also is someone able to suggest an elegant way to do the formatting for the numbers as shown above without using a large Select Case block?
thank you