Page 1 of 1

ViewXY formatting axis

Posted: Thu May 14, 2015 5:11 pm
by greggorob64
I need to be able to have my xAxis configurable to:

-Auto
-Scientific Always
-Decimal Always (configurable decimal places)

Im running into an issue, when I use "D" for a format specifier, the chart crashes.
When I use "00.00" (supposed to be two before and two after the decimal) it seems ignored. Am I missing something?

Thanks.

Code: Select all

         xAxis.ValueType = AxisValueType.Number;
         xAxis.AutoFormatLabels = false;
         xAxis.LabelsNumberFormat = "00000.0000";
Produces:
Image

Re: ViewXY formatting axis

Posted: Thu May 14, 2015 5:13 pm
by greggorob64
Scratch that, I found the mistake.

If you subscribe to the FormatValueLabel event, the format settings don't do anything. I'll leave this up for posterity, or you can just delete this.