fix: Improve big number time format UX (#1320)

* fix: Improve big number time format UX

* Update controlPanel.tsx
This commit is contained in:
Erik Ritter 2021-08-20 14:39:29 -07:00 committed by Yongjie Zhao
parent 370f4c0ec5
commit 3276a653e3

View File

@ -62,18 +62,6 @@ const config: ControlPanelConfig = {
}, },
], ],
['y_axis_format'], ['y_axis_format'],
[
{
name: 'show_timestamp',
config: {
type: 'CheckboxControl',
label: t('Show Timestamp'),
renderTrigger: true,
default: false,
description: t('Whether to display the timestamp'),
},
},
],
[ [
{ {
name: 'time_format', name: 'time_format',
@ -83,12 +71,19 @@ const config: ControlPanelConfig = {
label: t('Timestamp format'), label: t('Timestamp format'),
renderTrigger: true, renderTrigger: true,
choices: D3_TIME_FORMAT_OPTIONS, choices: D3_TIME_FORMAT_OPTIONS,
default: '%d-%m-%Y %H:%M:%S',
description: D3_FORMAT_DOCS, description: D3_FORMAT_DOCS,
visibility(props) { },
const { show_timestamp } = props.form_data; },
return !!show_timestamp; ],
}, [
{
name: 'show_timestamp',
config: {
type: 'CheckboxControl',
label: t('Show Timestamp'),
renderTrigger: true,
default: false,
description: t('Whether to display the timestamp'),
}, },
}, },
], ],