MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / makeCategoryLabelsActually

Function makeCategoryLabelsActually

libs/echarts/echarts.simple.js:38316–38341  ·  view source on GitHub ↗
(axis, labelModel)

Source from the content-addressed store, hash-verified

38314}
38315
38316function makeCategoryLabelsActually(axis, labelModel) {
38317 var labelsCache = getListCache(axis, 'labels');
38318 var optionLabelInterval = getOptionCategoryInterval(labelModel);
38319 var result = listCacheGet(labelsCache, optionLabelInterval);
38320
38321 if (result) {
38322 return result;
38323 }
38324
38325 var labels;
38326 var numericLabelInterval;
38327
38328 if (isFunction$1(optionLabelInterval)) {
38329 labels = makeLabelsByCustomizedCategoryInterval(axis, optionLabelInterval);
38330 }
38331 else {
38332 numericLabelInterval = optionLabelInterval === 'auto'
38333 ? makeAutoCategoryInterval(axis) : optionLabelInterval;
38334 labels = makeLabelsByNumericCategoryInterval(axis, numericLabelInterval);
38335 }
38336
38337 // Cache to avoid calling interval function repeatly.
38338 return listCacheSet(labelsCache, optionLabelInterval, {
38339 labels: labels, labelCategoryInterval: numericLabelInterval
38340 });
38341}
38342
38343function makeCategoryTicks(axis, tickModel) {
38344 var ticksCache = getListCache(axis, 'ticks');

Callers 2

makeCategoryLabelsFunction · 0.70
makeCategoryTicksFunction · 0.70

Calls 8

getListCacheFunction · 0.70
listCacheGetFunction · 0.70
isFunction$1Function · 0.70
makeAutoCategoryIntervalFunction · 0.70
listCacheSetFunction · 0.70

Tested by

no test coverage detected