Advanced Chart Features > Number Formatting and Scaling
FusionCharts for Dreamweaver can automatically format the values and other numbers which mark the scale along the y-axis. Number Formatting is managed from the 'Number formatting basics & scaling' panel which is located in the 'General Options' tab.
Following configurable options are available in the 'Number Formatting' panel.
- formatNumber: The 'formatNumber' parameter automatically formats numbers associated with primary Y-axis – the numbers would be formatted using default or custom defined thousand separators. Comma is the default thousand separator. This parameter will work only if the ‘formatNumberScale’ parameter has been disabled.
Numbers get atuomatically formatted
- sFormatNumber: The 'sFormatNumber' parameter automatically formats numbers associated with secondary Y-axis – the numbers would be formatted using default or custom defined thousand separators. Comma is the default thousand separator. This parameter will work only if the ‘sFormatNumberScale’ has been disabled.
- Decimals: The 'Decimals' parameter automatically round's up the numbers to the specified number of decimal places. Suppose the 'Decimals' is set to 2 - then 12.345 will be displayed as 12.34.

Chart with specified number of decimal places

Chart without specified number of decimal places
- sDecimals: This parameter is used for specifying the decimal places for the values pertaining to the secondary y-axis.
- forceDecimals: The 'forceDecimals' parameter automatically adds a 0 padding in order to make the number congruent to the specified number of decimal places. Suppose the 'Decimals' parameter is set to 2 - then 12.5 will be displayed as 12.50.

Trailing zeroes added to decimals
- sYAxisValueDecimals: This parameter is used for specifying the decimal places for the numbers that are displayed along the secondary y-axis of the chart.
Advanced Number Formatting Parameters
If the 'Show Advanced options check box' is selected - some additional parameters will be displayed in the 'Number formatting basics & scaling' panel. Following are the advanced configurable parameters that are available in the 'Number formatting basics & scaling' panel:
- formatNumberScale: If enabled, this parameter causes the values and numbers associated with the primary Y axis of the chart to be formatted using the default or the defined scale.
- sFormatNumberScale: If enabled, this parameter causes the values and numbers associated with the secondary Y axis of the chart to be formatted using the default or the defined scale.
- yAxisValueDecimals: This parameter lets you specify the maximum number of decimal places for the numbers that appear along the Y Axis of a chart.
- sYAxisValueDecimals: This parameter lets you specify the decimal places for numbers that appear along he secondary Y axis of a chart.
- decimalSeperator: This parameter lets you specify the character that will be used for separating the digits of a number from its decimals. '.' is the default separator - however, you may use any character as a decimal separator.
- thousandSeparator: In the ‘thousandSeparator’ field you can specify the character that will be used as a thousand’s separator.
- numberPrefix: In the ‘numberPrefix’ field you can specify the characters which will be prefixed to the data values associated with the primary Y axis and the numbers that appear along the Y axis. The ‘numberPrefix’ feature is very useful as it allows you to prefix currency names such as '£' and '$'.
- numberSuffix: In the 'numberSuffix' field you can specify the characters which will be suffixed to the data values associated to the primary Y axis and those values that appear along the primary Y axis. The ‘numberSuffix’ feature may be used to suffix characters such as %, hrs, min etc.
- sNumberPrefis: In the 'sNumberPrefix' field you can specify the characters that will be prefixed to values associated with the secondary Y axis and numbers that appear along the secondary Y axis.
- sNumerSuffix: In the 'snumberSuffix' field you can specify characters that will be suffixed to values associated with the Y axis and the numbers that appear along the secondary Y axis.
- defaultnumberScale, numberScaleValue and numberScaleUnit:
These parameters are collectively used for defining the Y axis scale. The process of configuring a scale is explained with examples, in the first example we show you how to define a scale for depicting time.
60 seconds = 1 minute
60 minutes = 1 hour
24 hours = 1 day
7 days = 1 week
In order to define a scale as shown above – set the ‘defaultNumberScale’ parameter as ‘s’, since second is the basic unit for defining time. Now enter ’60,60,24,7’ in the ‘numberScaleValue’ field and ‘min,hr,d,wk’ in the ‘numberScaleUnit’ field. The values entered in the ‘numberScaleValue’ field is used by FusionCharts for unit conversion, the following chart shows how appropriate units are automatically suffixed to each data value.
While using a customized scale - you need to keep in mind that the data for the series should be provided in terms of the 'defaultNumberScale' unit. For the time scale the 'defaultNumberScale' unit is seconds - so, the data must be provided in terms of seconds - as shown below.
300 seconds = 5 min
7200 seconds = 2 hours
86400 seconds = 1 day
604800 seconds = 1 week
Using FusionCharts for DW you can configure just about any kind of scale – here is another example.
100 centi meters = 1 meter
To define this scale set ‘defaultNumberScale’ to 'cm', enter ‘100’ in the ‘numberScaleValue’ field and ‘m’ in the ‘numberScaleUnit’ field. This scale will work only if the data has been configured in terms of the 'defaultNumberScale' unit - which in this case is centimeter.
- sDefaultNumberScale, sNumberScaleValue and sNumberScaleUnit: These parameters are used for defining a scale for secondary Y axis. The process of defining a scale for the secondary Y axis is the same as that for defining a scale for the primary Y axis.