Fixed problem where vertical charts didn't display labels correctly. (#2263)

#2017
This commit is contained in:
AlexFsmn
2018-08-20 21:01:00 +02:00
committed by Karl Burtram
parent a190190843
commit 92bc253cf7

View File

@@ -325,9 +325,11 @@ export class ChartViewerComponent implements OnInit, OnDestroy, IChartViewAction
@Input() set dataSet(dataSet: IGridDataSet) {
// Setup the execute result
this._executeResult = <IInsightData>{};
this._executeResult.columns = dataSet.columnDefinitions.map(def => def.name);
// Remove first column and its value since this is the row number column
this._executeResult.columns = dataSet.columnDefinitions.slice(1).map(def => def.name);
this._executeResult.rows = dataSet.dataRows.getRange(0, dataSet.dataRows.getLength()).map(gridRow => {
return gridRow.values.map(cell => (cell.invariantCultureDisplayValue === null || cell.invariantCultureDisplayValue === undefined) ? cell.displayValue : cell.invariantCultureDisplayValue);
return gridRow.values.slice(1).map(cell => (cell.invariantCultureDisplayValue === null || cell.invariantCultureDisplayValue === undefined) ? cell.displayValue : cell.invariantCultureDisplayValue);
});
}