MCPcopy Index your code
hub / github.com/apache/echarts / getTargetSeries

Function getTargetSeries

src/component/dataZoom/dataZoomProcessor.ts:38–76  ·  view source on GitHub ↗
(ecModel)

Source from the content-addressed store, hash-verified

36 // there is a line series and a pie series, it is better not to update the
37 // line series if only pie series is needed to be updated.
38 getTargetSeries(ecModel) {
39
40 function eachAxisModel(
41 cb: (
42 axisDim: DataZoomAxisDimension,
43 axisIndex: number,
44 axisModel: AxisBaseModel,
45 dataZoomModel: DataZoomModel
46 ) => void
47 ) {
48 ecModel.eachComponent('dataZoom', function (dataZoomModel: DataZoomModel) {
49 dataZoomModel.eachTargetAxis(function (axisDim, axisIndex) {
50 const axisModel = ecModel.getComponent(getAxisMainType(axisDim), axisIndex);
51 cb(axisDim, axisIndex, axisModel as AxisBaseModel, dataZoomModel);
52 });
53 });
54 }
55 // FIXME: it brings side-effect to `getTargetSeries`.
56 const proxyList: AxisProxy[] = [];
57 eachAxisModel(function (axisDim, axisIndex, axisModel, dataZoomModel) {
58 // Different dataZooms may control the same axis. In that case,
59 // an axisProxy serves both of them.
60 if (!getAxisProxyFromModel(axisModel)) {
61 // Use the first dataZoomModel as the main model of axisProxy.
62 const axisProxy = new AxisProxy(axisDim, axisIndex, dataZoomModel, ecModel);
63 proxyList.push(axisProxy);
64 setAxisProxyToModel(axisModel, axisProxy);
65 }
66 });
67
68 const seriesModelMap = createHashMap<SeriesModel>();
69 each(proxyList, function (axisProxy) {
70 each(axisProxy.getTargetSeriesModels(), function (seriesModel) {
71 seriesModelMap.set(seriesModel.uid, seriesModel);
72 });
73 });
74
75 return seriesModelMap;
76 },
77
78 // Consider appendData, where filter should be performed. Because data process is
79 // in block mode currently, it is not need to worry about that the overallProgress

Callers 2

Calls 5

getTargetSeriesModelsMethod · 0.95
getAxisProxyFromModelFunction · 0.90
setAxisProxyToModelFunction · 0.90
eachAxisModelFunction · 0.85
eachFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…