| 74 | type SlidedAxisExpandBehavior = 'none' | 'slide' | 'jump'; |
| 75 | |
| 76 | class Parallel implements CoordinateSystemMaster, CoordinateSystem { |
| 77 | |
| 78 | readonly type = COORD_SYS_TYPE_PARALLEL; |
| 79 | |
| 80 | /** |
| 81 | * key: dimension |
| 82 | */ |
| 83 | private _axesMap = createHashMap<ParallelAxis>(); |
| 84 | |
| 85 | /** |
| 86 | * key: dimension |
| 87 | * value: {position: [], rotation, } |
| 88 | */ |
| 89 | private _axesLayout: Dictionary<ParallelAxisLayoutInfo> = {}; |
| 90 | |
| 91 | /** |
| 92 | * Always follow axis order. |
| 93 | */ |
| 94 | readonly dimensions: ParallelModel['dimensions']; |
| 95 | |
| 96 | private _rect: graphic.BoundingRect; |
| 97 | |
| 98 | private _model: ParallelModel; |
| 99 | |
| 100 | // Inject |
| 101 | name: string; |
| 102 | model: ParallelModel; |
| 103 | |
| 104 | |
| 105 | constructor(parallelModel: ParallelModel, ecModel: GlobalModel, api: ExtensionAPI) { |
| 106 | this.dimensions = parallelModel.dimensions; |
| 107 | this._model = parallelModel; |
| 108 | |
| 109 | this._init(parallelModel, ecModel, api); |
| 110 | } |
| 111 | |
| 112 | private _init(parallelModel: ParallelModel, ecModel: GlobalModel, api: ExtensionAPI): void { |
| 113 | |
| 114 | const dimensions = parallelModel.dimensions; |
| 115 | const parallelAxisIndex = parallelModel.parallelAxisIndex; |
| 116 | |
| 117 | each(dimensions, function (dim, idx) { |
| 118 | |
| 119 | const axisIndex = parallelAxisIndex[idx]; |
| 120 | const axisModel = ecModel.getComponent('parallelAxis', axisIndex) as ParallelAxisModel; |
| 121 | |
| 122 | const axisType = axisHelper.determineAxisType(axisModel); |
| 123 | const axis = this._axesMap.set(dim, new ParallelAxis( |
| 124 | dim, |
| 125 | axisHelper.createScaleByModel(axisModel, axisType, false), |
| 126 | [0, 0], |
| 127 | axisType, |
| 128 | axisIndex |
| 129 | )); |
| 130 | |
| 131 | axis.onBand = axisHelper.isAxisOnBand(axis.scale, axisModel); |
| 132 | axis.inverse = axisModel.get('inverse'); |
| 133 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…