(source, seriesModel, opt)
| 34612 | } |
| 34613 | |
| 34614 | function createListFromArray(source, seriesModel, opt) { |
| 34615 | opt = opt || {}; |
| 34616 | |
| 34617 | if (!isSourceInstance(source)) { |
| 34618 | source = createSourceFromSeriesDataOption(source); |
| 34619 | } |
| 34620 | |
| 34621 | var coordSysName = seriesModel.get('coordinateSystem'); |
| 34622 | var registeredCoordSys = CoordinateSystemManager.get(coordSysName); |
| 34623 | var coordSysInfo = getCoordSysInfoBySeries(seriesModel); |
| 34624 | var coordSysDimDefs; |
| 34625 | |
| 34626 | if (coordSysInfo && coordSysInfo.coordSysDims) { |
| 34627 | coordSysDimDefs = map(coordSysInfo.coordSysDims, function (dim) { |
| 34628 | var dimInfo = { |
| 34629 | name: dim |
| 34630 | }; |
| 34631 | var axisModel = coordSysInfo.axisMap.get(dim); |
| 34632 | |
| 34633 | if (axisModel) { |
| 34634 | var axisType = axisModel.get('type'); |
| 34635 | dimInfo.type = getDimensionTypeByAxis(axisType); // dimInfo.stackable = isStackable(axisType); |
| 34636 | } |
| 34637 | |
| 34638 | return dimInfo; |
| 34639 | }); |
| 34640 | } |
| 34641 | |
| 34642 | if (!coordSysDimDefs) { |
| 34643 | // Get dimensions from registered coordinate system |
| 34644 | coordSysDimDefs = registeredCoordSys && (registeredCoordSys.getDimensionsInfo ? registeredCoordSys.getDimensionsInfo() : registeredCoordSys.dimensions.slice()) || ['x', 'y']; |
| 34645 | } |
| 34646 | |
| 34647 | var useEncodeDefaulter = opt.useEncodeDefaulter; |
| 34648 | var dimInfoList = createDimensions(source, { |
| 34649 | coordDimensions: coordSysDimDefs, |
| 34650 | generateCoord: opt.generateCoord, |
| 34651 | encodeDefaulter: isFunction(useEncodeDefaulter) ? useEncodeDefaulter : useEncodeDefaulter ? curry(makeSeriesEncodeForAxisCoordSys, coordSysDimDefs, seriesModel) : null |
| 34652 | }); |
| 34653 | var firstCategoryDimIndex; |
| 34654 | var hasNameEncode; |
| 34655 | coordSysInfo && each(dimInfoList, function (dimInfo, dimIndex) { |
| 34656 | var coordDim = dimInfo.coordDim; |
| 34657 | var categoryAxisModel = coordSysInfo.categoryAxisMap.get(coordDim); |
| 34658 | |
| 34659 | if (categoryAxisModel) { |
| 34660 | if (firstCategoryDimIndex == null) { |
| 34661 | firstCategoryDimIndex = dimIndex; |
| 34662 | } |
| 34663 | |
| 34664 | dimInfo.ordinalMeta = categoryAxisModel.getOrdinalMeta(); |
| 34665 | |
| 34666 | if (opt.createInvertedIndices) { |
| 34667 | dimInfo.createInvertedIndices = true; |
| 34668 | } |
| 34669 | } |
| 34670 | |
| 34671 | if (dimInfo.otherDims.itemName != null) { |
no test coverage detected
searching dependent graphs…