ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Axis Labels Parameter Substitution and Formatting
Posted by JC on Jan-17-2009 04:02
If we use the Y-Axis Scaling as the example.  I would like to format the numeric values of Y label base on the .Net framework...
System.Globalization.CultureInfo.CurrentUICulture and  System.Globalization.CultureInfo.InstalledUICulture classes to pass down into the setLabelFormat parameter.


am using c.yAxis().setLabelFormat("{value}") to format the Y Axis data labels.

  Re: Axis Labels Parameter Substitution and Formatting
Posted by Peter Kwan on Jan-18-2009 03:07
Hi JC,

In ChartDirector number formatting, you can specify the decimal separator as well as the thousand separator.

To use the settings in a CultureInfo object, just use the decimal separator and/or the thousand separator in the CultureInfo object in the ChartDirector format string.

For example, instead of hard coding comma and dot as thousand and decimal separator like as follows:

"{value|,.}"

you may use:

"{value|" & System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberGroupSeparator & System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator & "}"

Hope this can help.

Regards
Peter Kwan