mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix bar chart displaying extra series (#1230)
This commit is contained in:
@@ -255,17 +255,17 @@ export abstract class ChartInsight extends Disposable implements IInsightsView {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this._config.columnsAsLabels) {
|
if (this._config.columnsAsLabels) {
|
||||||
return this._data.rows[0].map((row, i) => {
|
return this._data.rows[0].slice(1).map((row, i) => {
|
||||||
return {
|
return {
|
||||||
data: this._data.rows.map(row => Number(row[i])),
|
data: this._data.rows.map(row => Number(row[i + 1])),
|
||||||
label: this._data.columns[i]
|
label: this._data.columns[i + 1]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return this._data.rows[0].map((row, i) => {
|
return this._data.rows[0].slice(1).map((row, i) => {
|
||||||
return {
|
return {
|
||||||
data: this._data.rows.map(row => Number(row[i])),
|
data: this._data.rows.map(row => Number(row[i + 1])),
|
||||||
label: 'Series' + i
|
label: 'Series' + (i + 1)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user