(data: SeriesData, axisDim: string)
| 263 | } |
| 264 | |
| 265 | export function getDataDimensionsOnAxis(data: SeriesData, axisDim: string): DimensionName[] { |
| 266 | // Remove duplicated dat dimensions caused by `getStackedDimension`. |
| 267 | const dataDimMap = {} as Dictionary<boolean>; |
| 268 | // Currently `mapDimensionsAll` will contain stack result dimension ('__\0ecstackresult'). |
| 269 | // PENDING: is it reasonable? Do we need to remove the original dim from "coord dim" since |
| 270 | // there has been stacked result dim? |
| 271 | zrUtil.each(data.mapDimensionsAll(axisDim), function (dataDim) { |
| 272 | // For example, the extent of the original dimension |
| 273 | // is [0.1, 0.5], the extent of the `stackResultDimension` |
| 274 | // is [7, 9], the final extent should NOT include [0.1, 0.5], |
| 275 | // because there is no graphic corresponding to [0.1, 0.5]. |
| 276 | // See the case in `test/area-stack.html` `main1`, where area line |
| 277 | // stack needs `yAxis` not start from 0. |
| 278 | dataDimMap[getStackedDimension(data, dataDim)] = true; |
| 279 | }); |
| 280 | return zrUtil.keys(dataDimMap); |
| 281 | } |
| 282 | |
| 283 | export function isNameLocationCenter(nameLocation: AxisBaseOptionCommon['nameLocation']) { |
| 284 | return nameLocation === 'middle' || nameLocation === 'center'; |
no test coverage detected
searching dependent graphs…