feat(number-format): Add duration formatter with colon notation (#30593)
This commit is contained in:
parent
ec2d3307fd
commit
3d443e0126
|
|
@ -57,6 +57,7 @@ export const D3_FORMAT_OPTIONS: [string, string][] = [
|
|||
...d3Formatted,
|
||||
['DURATION', t('Duration in ms (66000 => 1m 6s)')],
|
||||
['DURATION_SUB', t('Duration in ms (1.40008 => 1ms 400µs 80ns)')],
|
||||
['DURATION_COL', t('Duration in ms (10500 => 0:10.5)')],
|
||||
['MEMORY_DECIMAL', t('Memory in bytes - decimal (1024B => 1.024kB)')],
|
||||
['MEMORY_BINARY', t('Memory in bytes - binary (1024B => 1KiB)')],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -78,6 +78,10 @@ export default function setupFormatters(
|
|||
'DURATION_SUB',
|
||||
createDurationFormatter({ formatSubMilliseconds: true }),
|
||||
)
|
||||
.registerValue(
|
||||
'DURATION_COL',
|
||||
createDurationFormatter({ colonNotation: true }),
|
||||
)
|
||||
.registerValue('MEMORY_DECIMAL', createMemoryFormatter({ binary: false }))
|
||||
.registerValue('MEMORY_BINARY', createMemoryFormatter({ binary: true }));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue