Entity Formatting
The insight.Formatter object holds the default formats for different numeric data types (integer and real) and provides a formatting method insight.Formatter.formatNumber() that can be applied to any data within your view code. Model entities can be formatted according to their data type (or element data type, in the case of arrays) by using the insight.Formatter.formatEntityValue() method. If the entity is a set and has an associated labels entity, you can get the formatted label value using the insight.Formatter.getFormattedLabel() method.
![]() |
Note In setting a custom formatter for an entity, it will override any standard formatting.
|
// Arrays and sets only; in this case 'Array1' is an array. insight.Formatter.setEntityFormatter('Array1', function(original) { return insight.Formatter.formatNumber(original, '$#,##0.0#', null); });
![]() |
Note See
insight.Formatter in the JavaScript API documentation for function signatures and other details.
|
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.