MCPcopy Create free account
hub / github.com/apache/echarts / getDefaultFormatPrecisionOfInterval

Function getDefaultFormatPrecisionOfInterval

src/util/time.ts:264–275  ·  view source on GitHub ↗
(timeUnit: PrimaryTimeUnit)

Source from the content-addressed store, hash-verified

262}
263
264export function getDefaultFormatPrecisionOfInterval(timeUnit: PrimaryTimeUnit): PrimaryTimeUnit {
265 switch (timeUnit) {
266 case 'year':
267 case 'month':
268 return 'day';
269 case 'millisecond':
270 return 'millisecond';
271 default:
272 // Also for day, hour, minute, second
273 return 'second';
274 }
275}
276
277export function format(
278 // Note: The result based on `isUTC` are totally different, which can not be just simply

Callers 1

getLabelMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected