123456789101112131415161718192021222324252627282930313233343536373839 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Licensed Materials - Property of IBM
- * IBM Business Analytics (C) Copyright IBM Corp. 2019
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['../../../util/DashboardFormatter'], function (Formatter) {
- // implements IFormatter
- var VIPRFormatter = function () {
- function VIPRFormatter(slotIndex, dataItemIndex, context) {
- _classCallCheck(this, VIPRFormatter);
- if (context.index.dataItemFormats !== undefined) {
- this._format = context.index.dataItemFormats[dataItemIndex];
- } else {
- var slot = context.dataset.slots[slotIndex];
- var dataItem = slot.getDataItemList()[dataItemIndex];
- this._format = dataItem.getFormat();
- }
- }
- VIPRFormatter.prototype.getFormat = function getFormat() {
- return this._format;
- };
- VIPRFormatter.prototype.format = function format(value) {
- return Formatter.format(value, this._format);
- };
- return VIPRFormatter;
- }();
- return VIPRFormatter;
- });
- //# sourceMappingURL=VIPRFormatter.js.map
|