mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 17:23:51 -05:00
add support to accept visualization options (#14254)
* allow query provider to specify visual options * make it reusable * add comment * fix error * null check
This commit is contained in:
@@ -237,6 +237,16 @@ export class QueryResultsView extends Disposable {
|
||||
if (runner.messages.some(v => v.isError)) {
|
||||
this._panelView.showTab(this.messagesTab.identifier);
|
||||
}
|
||||
// Currently we only need to support visualization options for the first result set.
|
||||
if (runner.batchSets[0]?.resultSetSummaries[0]?.visualization) {
|
||||
const batchSet = runner.batchSets[0];
|
||||
const resultSet = batchSet.resultSetSummaries[0];
|
||||
this.chartData({
|
||||
resultId: batchSet.id,
|
||||
batchId: resultSet.batchId
|
||||
});
|
||||
this.chartTab.view.setVisualizationOptions(resultSet.visualization);
|
||||
}
|
||||
}));
|
||||
|
||||
if (this.input?.state.visibleTabs.has(this.chartTab.identifier) && !this._panelView.contains(this.chartTab)) {
|
||||
|
||||
Reference in New Issue
Block a user