IndexedFormatterTItem Property (CategoryKey)

Spotfire 14.3 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: 65.0.19510.3242 (65.0.19510.3242)
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: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also

Reference