Skip to content

Commit

Permalink
use default values from constants
Browse files Browse the repository at this point in the history
  • Loading branch information
hexcafe committed Jul 1, 2024
1 parent 4aeb6d4 commit b32b91e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ import {
SORT_SERIES_CHOICES,
sharedControls,
} from '@superset-ui/chart-controls';
import { DEFAULT_LEGEND_FORM_DATA, StackControlOptions } from './constants';
import {
DEFAULT_LEGEND_FORM_DATA,
StackControlOptions,
TIMESERIES_CONSTANTS,
} from './constants';
import { DEFAULT_FORM_DATA } from './Timeseries/constants';
import { defaultXAxis } from './defaults';

Expand Down Expand Up @@ -314,7 +318,7 @@ export const dataZoom: ControlSetItem = {
config: {
type: 'CheckboxControl',
label: t('Data Zoom'),
default: false,
default: DEFAULT_FORM_DATA.zoomable,
renderTrigger: true,
description: t('Enable data zooming controls'),
},
Expand All @@ -331,7 +335,7 @@ export const dataZoomSliderOptions: ControlSetItem[][] = [
min: 0,
max: 100,
step: 1,
default: 0,
default: TIMESERIES_CONSTANTS.dataZoomStart,
description: t(
'The start percentage of the window out of the data extent, in the range of 0 ~ 100.',
),
Expand All @@ -350,7 +354,7 @@ export const dataZoomSliderOptions: ControlSetItem[][] = [
min: 0,
max: 100,
step: 1,
default: 0,
default: TIMESERIES_CONSTANTS.dataZoomEnd,
description: t(
'The end percentage of the window out of the data extent, in the range of 0 ~ 100.',
),
Expand Down

0 comments on commit b32b91e

Please sign in to comment.