LinearAxis "StringFormat" not working?

Nov 15, 2011 at 1:18 PM

Using the latest WPF Toolkit release to build a WPF app, I have a Chart with two LineSeries. The dependent axis is displaying 64-bit ints (i.e., "long"s). At this point, I only have one data point that is in excess of 4,000,000,000, but I have others that are relatively large, and it would make things much easier if I were able to use the Binding.StringFormat, and specify that format as "N" - a standard numeric format that includes the current-culture's separator character. so that the number above would display as I typed it, i.e., with separator characters.

I have tried three approaches:

  1. Using the LineSeries DependentValueBinding={Binding NumericElement, StringFormat=N} and other variants of that including ones with escaped "{" and "}" characters and the custom numeric formatting characters #,#.
    1. This does nothing, i.e., the values show in the axis, however, they are not formatted.
  2. Using a converter that returns a properly formatted string.
    1. This throws an exception that states the right axis type cannot be found.
  3. Using a Style to set a template and the StringFormat property for a LinearAxis in the "Y" orientation.
    1. Using the custom format characters #,# in that approach throws an "unexpected character" exception.
    2. Using the custom format characters 0:0.## displays the number without formatting.
    3. And if I am not mistaken, one variant of this also produced the exception that the proper axis type cannot be found.

Is there a means to format the numbers on a linear axis with separator characters?

Thanks in advance!