MCPcopy
hub / github.com/apache/echarts / getPrimaryTimeUnit

Function getPrimaryTimeUnit

src/util/time.ts:243–258  ·  view source on GitHub ↗
(timeUnit: TimeUnit)

Source from the content-addressed store, hash-verified

241}
242
243export function getPrimaryTimeUnit(timeUnit: TimeUnit): PrimaryTimeUnit {
244 switch (timeUnit) {
245 case 'half-year':
246 case 'quarter':
247 return 'month';
248 case 'week':
249 case 'half-week':
250 return 'day';
251 case 'half-day':
252 case 'quarter-day':
253 return 'hour';
254 default:
255 // year, minutes, second, milliseconds
256 return timeUnit;
257 }
258}
259
260export function isPrimaryTimeUnit(timeUnit: TimeUnit): boolean {
261 return timeUnit === getPrimaryTimeUnit(timeUnit);

Callers 4

getLabelMethod · 0.90
addLevelTicksFunction · 0.90
createIntervalTicksFunction · 0.90
isPrimaryTimeUnitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…