Skip to content

Commit

Permalink
fix: Improve big number time format UX (apache#1320)
Browse files Browse the repository at this point in the history
* fix: Improve big number time format UX

* Update controlPanel.tsx
  • Loading branch information
Erik Ritter authored and zhaoyongjie committed Nov 17, 2021
1 parent f9c7f24 commit db85e4e
Showing 1 changed file with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,26 @@ const config: ControlPanelConfig = {
['y_axis_format'],
[
{
name: 'show_timestamp',
name: 'time_format',
config: {
type: 'CheckboxControl',
label: t('Show Timestamp'),
type: 'SelectControl',
freeForm: true,
label: t('Timestamp format'),
renderTrigger: true,
default: false,
description: t('Whether to display the timestamp'),
choices: D3_TIME_FORMAT_OPTIONS,
description: D3_FORMAT_DOCS,
},
},
],
[
{
name: 'time_format',
name: 'show_timestamp',
config: {
type: 'SelectControl',
freeForm: true,
label: t('Timestamp format'),
type: 'CheckboxControl',
label: t('Show Timestamp'),
renderTrigger: true,
choices: D3_TIME_FORMAT_OPTIONS,
default: '%d-%m-%Y %H:%M:%S',
description: D3_FORMAT_DOCS,
visibility(props) {
const { show_timestamp } = props.form_data;
return !!show_timestamp;
},
default: false,
description: t('Whether to display the timestamp'),
},
},
],
Expand Down

0 comments on commit db85e4e

Please sign in to comment.