10-04-2007 07:07 AM
10-04-2007 10:17 AM
It seems that you are trying to change the FormatString to your derived class in the RangeChanged event of the axis. Instead, you should assign an instance of your FormatString derived class to the LabelFormat property of the axis MajorDivisions once and perform your formatting in the FormatDouble override.
MyAxis.MajorDivisions.LabelFormat = new MyCustomFormatString(...);
You do not need to reassign this property every time the axis range changes, nor do you need to hold the Range values in your custom FormatString. The argument provided to the FormatDouble method is a one of the range minimum or maximum values that you should format.
I may have misunderstood how exactly you are accomplishing your objective now, so if you could post a code sample, it would help us analyze the issue more effectively. Thanks for your question.
10-05-2007 02:02 AM