mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
A set of minor fixes (#3014)
This commit is contained in:
committed by
GitHub
parent
5344a80535
commit
99e1de58bc
@@ -655,6 +655,7 @@ export const controls = {
|
||||
type: 'SelectControl',
|
||||
label: 'Entity',
|
||||
default: null,
|
||||
validators: [v.nonEmpty],
|
||||
description: 'This define the element to be plotted on the chart',
|
||||
mapStateToProps: state => ({
|
||||
choices: (state.datasource) ? state.datasource.gb_cols : [],
|
||||
@@ -761,7 +762,9 @@ export const controls = {
|
||||
type: 'SelectControl',
|
||||
freeForm: true,
|
||||
label: 'Table Timestamp Format',
|
||||
default: 'smart_date',
|
||||
default: '%Y-%m-%d %H:%M:%S',
|
||||
validators: [v.nonEmpty],
|
||||
clearable: false,
|
||||
choices: D3_TIME_FORMAT_OPTIONS,
|
||||
description: 'Timestamp Format',
|
||||
},
|
||||
|
||||
@@ -183,6 +183,9 @@ const visTypes = {
|
||||
y_axis_format: {
|
||||
label: 'Left Axis Format',
|
||||
},
|
||||
x_axis_format: {
|
||||
choices: D3_TIME_FORMAT_OPTIONS,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -211,6 +214,13 @@ const visTypes = {
|
||||
},
|
||||
sections.NVD3TimeSeries[1],
|
||||
],
|
||||
controlOverrides: {
|
||||
x_axis_format: {
|
||||
choices: D3_TIME_FORMAT_OPTIONS,
|
||||
default: control =>
|
||||
control.choices && control.choices.length > 0 ? [control.choices[0][0]] : null,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
compare: {
|
||||
@@ -475,9 +485,8 @@ const visTypes = {
|
||||
label: null,
|
||||
controlSetRows: [
|
||||
['metric'],
|
||||
['compare_lag'],
|
||||
['compare_suffix'],
|
||||
['y_axis_format'],
|
||||
['compare_lag', 'compare_suffix'],
|
||||
['y_axis_format', null],
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user