diff --git a/superset-frontend/src/explore/store.js b/superset-frontend/src/explore/store.js index 9b33aaa49f6a9..16ad2324c0922 100644 --- a/superset-frontend/src/explore/store.js +++ b/superset-frontend/src/explore/store.js @@ -41,7 +41,8 @@ export function getControlsState(state, inputFormData) { * */ // Getting a list of active control names for the current viz const formData = { ...inputFormData }; - const vizType = formData.viz_type || 'table'; + const vizType = + formData.viz_type || state.common.conf.DEFAULT_VIZ_TYPE || 'table'; handleDeprecatedControls(formData); diff --git a/superset/config.py b/superset/config.py index 94abd64cd997f..a9d52ae1961ff 100644 --- a/superset/config.py +++ b/superset/config.py @@ -114,6 +114,9 @@ def _try_json_readsha( # pylint: disable=unused-argument VERSION_SHA_LENGTH = 8 VERSION_SHA = _try_json_readsha(VERSION_INFO_FILE, VERSION_SHA_LENGTH) +# default viz used in chart explorer +DEFAULT_VIZ_TYPE = "table" + ROW_LIMIT = 50000 VIZ_ROW_LIMIT = 10000 # max rows retreieved when requesting samples from datasource in explore view diff --git a/superset/views/base.py b/superset/views/base.py index cb486c51357ab..9236570f8f7f6 100644 --- a/superset/views/base.py +++ b/superset/views/base.py @@ -74,6 +74,7 @@ "DISABLE_DATASET_SOURCE_EDIT", "ENABLE_JAVASCRIPT_CONTROLS", "DEFAULT_SQLLAB_LIMIT", + "DEFAULT_VIZ_TYPE", "SQL_MAX_ROW", "SUPERSET_WEBSERVER_DOMAINS", "SQLLAB_SAVE_WARNING_MESSAGE",