Fix #457 Provide user setting to change defaults for Chart Viewer (#484)

- Added contribution to define the available chart types
- Use the setting when initializing the chart viewer
This commit is contained in:
Kevin Cunnane
2018-01-14 14:16:01 -08:00
committed by GitHub
parent 146fd41b50
commit a6cb7cbd65
4 changed files with 35 additions and 5 deletions

View File

@@ -13,3 +13,14 @@ export const shortcutStart = 'shortcut';
export const tabColorModeOff = 'off';
export const tabColorModeBorder = 'border';
export const tabColorModeFill = 'fill';
export const defaultChartType = 'defaultChartType';
export const chartTypeBar = 'bar';
export const chartTypeDoughnut = 'doughnut';
export const chartTypeHorizontalBar = 'horizontalBar';
export const chartTypeLine = 'line';
export const chartTypePie = 'pie';
export const chartTypeScatter = 'scatter';
export const chartTypeTimeSeries = 'timeSeries';
export const allChartTypes = [chartTypeBar, chartTypeDoughnut, chartTypeHorizontalBar, chartTypeLine,
chartTypePie, chartTypeScatter, chartTypeTimeSeries];

View File

@@ -241,6 +241,11 @@ let registryProperties = {
'description': localize('sql.showBatchTime', '[Optional] Should execution time be shown for individual batches'),
'default': false
},
'sql.chart.defaultChartType': {
'enum': Constants.allChartTypes,
'default': Constants.chartTypeHorizontalBar,
'description': localize('defaultChartType', "[Optional] the default chart type to use when opening Chart Viewer from a Query Results")
},
'sql.tabColorMode': {
'type': 'string',
'enum': [Constants.tabColorModeOff, Constants.tabColorModeBorder, Constants.tabColorModeFill],