mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 03:58:33 -05:00
Refactor chart viewer (#2381)
* working on adding charts * working on chart options * adding image and table insight * add chart viewing and handle a bunch of small bugs * formatting * remove unused code
This commit is contained in:
32
src/sql/parts/query/editor/charting/chartTab.ts
Normal file
32
src/sql/parts/query/editor/charting/chartTab.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { IPanelTab } from 'sql/base/browser/ui/panel/panel';
|
||||
import { ChartView } from './chartView';
|
||||
import QueryRunner from 'sql/parts/query/execution/queryRunner';
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class ChartTab implements IPanelTab {
|
||||
public readonly title = localize('chartTabTitle', 'Chart');
|
||||
public readonly identifier = generateUuid();
|
||||
public readonly view: ChartView;
|
||||
|
||||
constructor(@IInstantiationService instantiationService: IInstantiationService) {
|
||||
this.view = instantiationService.createInstance(ChartView);
|
||||
}
|
||||
|
||||
public set queryRunner(runner: QueryRunner) {
|
||||
this.view.queryRunner = runner;
|
||||
}
|
||||
|
||||
public chart(dataId: { batchId: number, resultId: number}): void {
|
||||
this.view.chart(dataId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user