Formatting Column Data
When formatting numeric data for presentation in DiveTab, you can include the format specification in the cPlan or the divetab script. The syntax for Spectre is the same as that used by the Calc object in Integrator.
NOTE: The default format is "#,##0.0##" for values.
Dollars and Cents
Given this cPlan:
And this module configuration:
Here is the result of the code in DiveTab.
Value formatting can also be done within the text column tag.
Here is an example of how a text column tag is formatted.
Note that this format only applies to that summary column; formatting within the cPlan applies the changes to every instance where the cPlan is used.
In this example:
- The dollar sign now appears in front of each value. If no dollar sign appears, it means it does not appear in the column.
- The comma indicates that larger numbers are segmented. No comma means no segmentation.
- The two decimal places indicate how the numbers are rounded. No decimal means the number is not rounded.
See also:
- What is a Data Area?
- What is a Column Set?
- What is an Expand Set?
- Spectre Format Conventions
- Numeric Functions in Integrator