in src/visualComponent/table/body/collapsedBodyRowComponent.ts [120:207]
private renderCells(options: IBodyRowRenderOptions): void {
const {
series,
settings,
} = options;
// As of Date
this.updateOrderByIndex(0, settings.asOfDate.order);
// Metric Name
const metricNameOrder: number = this.getOrder(settings.metricName.order);
this.components[this.amountOfPreCells + 1].render({
fontSettings: settings.metricName,
order: metricNameOrder,
value: this.getLabel(series),
} as ITextCellRenderOptions);
this.verticalDraggableComponents[this.amountOfPreCells + 1].updateOrder(metricNameOrder);
// Current Value's formatter
const currentValueFormatter: valueFormatter.IValueFormatter = FormattingUtils.getValueFormatter(
settings.currentValue.displayUnits || series.currentValue || 0,
undefined,
undefined,
settings.currentValue.precision,
settings.currentValue.getFormat(),
);
// Current Value
const currentValueOrder: number = this.getOrder(settings.currentValue.order);
this.components[this.amountOfPreCells + 2].render({
fontSettings: settings.currentValue,
order: currentValueOrder,
value: FormattingUtils.getFormattedValue(series.currentValue, currentValueFormatter),
} as ITextCellRenderOptions);
this.verticalDraggableComponents[this.amountOfPreCells + 2].updateOrder(currentValueOrder);
// KPI Indicator
this.updateOrderByIndex(3, settings.kpiIndicatorValue.order);
// Comparison Value's formatter
const comparisonValueFormatter: valueFormatter.IValueFormatter = FormattingUtils.getValueFormatter(
settings.comparisonValue.displayUnits || series.comparisonValue || 0,
undefined,
undefined,
settings.comparisonValue.precision,
settings.comparisonValue.getFormat(),
);
// Comparison Value
const comparisonValueOrder: number = this.getOrder(settings.comparisonValue.order);
this.components[this.amountOfPreCells + 4].render({
fontSettings: settings.comparisonValue,
order: comparisonValueOrder,
value: FormattingUtils.getFormattedValue(series.comparisonValue, comparisonValueFormatter),
} as ITextCellRenderOptions);
this.verticalDraggableComponents[this.amountOfPreCells + 4].updateOrder(comparisonValueOrder);
// Sparkline
this.updateOrderByIndex(5, settings.sparklineSettings.order);
// Second Comparison Value's formatter
const secondComparisonValueFormatter: valueFormatter.IValueFormatter = FormattingUtils.getValueFormatter(
settings.secondComparisonValue.displayUnits || series.secondComparisonValue || 0,
undefined,
undefined,
settings.secondComparisonValue.precision,
settings.secondComparisonValue.getFormat(),
);
// Second Comparison Value
const secondComparisonValueOrder: number = this.getOrder(settings.secondComparisonValue.order);
this.components[this.amountOfPreCells + 6].render({
fontSettings: settings.secondComparisonValue,
order: secondComparisonValueOrder,
value: FormattingUtils.getFormattedValue(series.secondComparisonValue, secondComparisonValueFormatter),
} as ITextCellRenderOptions);
this.verticalDraggableComponents[this.amountOfPreCells + 6].updateOrder(secondComparisonValueOrder);
this.updateOrderByIndex(7, settings.secondKPIIndicatorValue.order);
}