IndexedFormatterTItem Property (CategoryKey) TIBCO Spotfire 7.6 API Reference
Gets or sets the formatting for a category or column.

Namespace: Spotfire.Dxp.Application.Visuals
Assembly: Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 25.11.10401.3615 (25.11.10401.3615)
Syntax

C#
public T this[
	CategoryKey categories
] { get; set; }

Parameters

categories
Type: Spotfire.Dxp.Application.VisualsCategoryKey
The expression for a category or column.

Return Value

Type: T
The formatting for the category or column.
Examples

The following sample shows how to set different decimal digits for different scales when using multiple scales in a Line Chart, that is, with YAxis.IndividualScaling true.
C#
NumberFormatter costFormatter = (NumberFormatter)DataType.Real.CreateFormatter();
NumberFormatter salesFormatter = (NumberFormatter)DataType.Real.CreateFormatter();
leftFormatter.Category = NumberFormatCategory.Number;
salesFormatter.Category = NumberFormatCategory.Number;
costFormatter.DecimalDigits = 2;
salesFormatter.DecimalDigits = 0;
lineChart.YAxis.Scale.Formatting.IndexedRealFormatter[new CategoryKey("Sum(Cost)")] = costFormatter;
lineChart.YAxis.Scale.Formatting.IndexedRealFormatter[new CategoryKey("Sum(Sales)")] = salesFormatter;
Examples

The following sample shows how to set a two-digit US currency formatting for Sum(Sales) columns in a Cross Table.
C#
NumberFormatter formatter = (NumberFormatter)DataType.Real.CreateFormatter();
formatter.Category = NumberFormatCategory.Currency;
formatter.DecimalDigits = 2;
formatter.CultureInfo = new CultureInfo("en-US");
crossTable.Formatting.IndexedRealFormatter["Sum(Sales)"] = formatter;
Version Information

Supported in: 7.6, 7.5, 7.0, 6.5, 6.0, 5.5, 5.0
See Also

Reference