MCPcopy Index your code
hub / github.com/tdewolff/minify / createGetKey

Function createGetKey

_benchmarks/sample_echarts.js:70485–70519  ·  view source on GitHub ↗
(data, diffMode, dimension)

Source from the content-addressed store, hash-verified

70483 }(ChartView);
70484
70485 function createGetKey(data, diffMode, dimension) {
70486 if (!data) {
70487 return;
70488 }
70489
70490 if (diffMode === 'oneToOne') {
70491 return function (rawIdx, dataIndex) {
70492 return data.getId(dataIndex);
70493 };
70494 }
70495
70496 var diffByDimName = data.getDimension(dimension);
70497 var dimInfo = data.getDimensionInfo(diffByDimName);
70498
70499 if (!dimInfo) {
70500 var errMsg = '';
70501
70502 if ("development" !== 'production') {
70503 errMsg = dimension + " is not a valid dimension.";
70504 }
70505
70506 throwError(errMsg);
70507 }
70508
70509 var ordinalMeta = dimInfo.ordinalMeta;
70510 return function (rawIdx, dataIndex) {
70511 var key = data.get(diffByDimName, dataIndex);
70512
70513 if (ordinalMeta) {
70514 key = ordinalMeta.categories[key];
70515 }
70516
70517 return key == null || eqNaN(key) ? rawIdx + '' : '_ec_' + key;
70518 };
70519 }
70520
70521 function createEl(elOption) {
70522 var graphicType = elOption.type;

Callers 1

sample_echarts.jsFile · 0.85

Calls 2

throwErrorFunction · 0.85
eqNaNFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…