It is related with your code of this post:
http://www.teechart.net/support/viewtop ... 130#p65130
In order to get the width of the labels we do this?
Code: Select all
double maxVal = chart.Series[current].CustomVertAxis.Maximum;
float twidth = chart.Graphics3D.TextWidth(maxVal.ToString(chart.Series[current].CustomVertAxis.Labels.ValueFormat));
But by example when maxval is 94.33, and the he label doesn’t show decimals, so the label only shows 94 (this is right). But twidth is not right because “ValueFormat” says "#,##0.###". But I don't want to change the valueformat because it is interesting to show decimals if the scale is short (That is not the main point only to clarify I cannot change the ValueFormat).
The main point is, how can I know if the maximum label is showing with or without decimals? In order to solve the problem in the calculation of twidth...
Thanks