mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fixed problem where vertical charts didn't display labels correctly. (#2263)
#2017
This commit is contained in:
@@ -325,9 +325,11 @@ export class ChartViewerComponent implements OnInit, OnDestroy, IChartViewAction
|
|||||||
@Input() set dataSet(dataSet: IGridDataSet) {
|
@Input() set dataSet(dataSet: IGridDataSet) {
|
||||||
// Setup the execute result
|
// Setup the execute result
|
||||||
this._executeResult = <IInsightData>{};
|
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 => {
|
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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user