79fe98244c3936d6476ec2d0f91cd31d399107cecec03da04625e92e2ff0921b8fc82d2c91793331f1991a4b229a992aa98b8cf3f9893bcbb7a0db9a1348d9 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. import { PathStyleProps } from 'zrender/lib/graphic/Path.js';
  2. import Model from '../model/Model.js';
  3. import DataDiffer from './DataDiffer.js';
  4. import { DataProvider } from './helper/dataProvider.js';
  5. import { DimensionSummary } from './helper/dimensionHelper.js';
  6. import SeriesDimensionDefine from './SeriesDimensionDefine.js';
  7. import { ArrayLike, Dictionary, FunctionPropertyNames } from 'zrender/lib/core/types.js';
  8. import Element from 'zrender/lib/Element.js';
  9. import { DimensionIndex, DimensionName, DimensionLoose, OptionDataItem, ParsedValue, ParsedValueNumeric, SeriesDataType, OptionSourceData, DecalObject, OrdinalNumber } from '../util/types.js';
  10. import type Graph from './Graph.js';
  11. import type Tree from './Tree.js';
  12. import type { VisualMeta } from '../component/visualMap/VisualMapModel.js';
  13. import { Source } from './Source.js';
  14. import { LineStyleProps } from '../model/mixin/lineStyle.js';
  15. import DataStore, { DimValueGetter } from './DataStore.js';
  16. import { SeriesDataSchema } from './helper/SeriesDataSchema.js';
  17. declare type ItrParamDims = DimensionLoose | Array<DimensionLoose>;
  18. declare type CtxOrList<Ctx> = unknown extends Ctx ? SeriesData : Ctx;
  19. declare type EachCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => void;
  20. declare type EachCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, idx: number) => void;
  21. declare type EachCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, y: ParsedValue, idx: number) => void;
  22. declare type EachCb<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => void;
  23. declare type FilterCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => boolean;
  24. declare type FilterCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, idx: number) => boolean;
  25. declare type FilterCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, y: ParsedValue, idx: number) => boolean;
  26. declare type FilterCb<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => boolean;
  27. declare type MapArrayCb0<Ctx> = (this: CtxOrList<Ctx>, idx: number) => any;
  28. declare type MapArrayCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, idx: number) => any;
  29. declare type MapArrayCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, y: ParsedValue, idx: number) => any;
  30. declare type MapArrayCb<Ctx> = (this: CtxOrList<Ctx>, ...args: any) => any;
  31. declare type MapCb1<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, idx: number) => ParsedValue | ParsedValue[];
  32. declare type MapCb2<Ctx> = (this: CtxOrList<Ctx>, x: ParsedValue, y: ParsedValue, idx: number) => ParsedValue | ParsedValue[];
  33. declare type SeriesDimensionDefineLoose = string | object | SeriesDimensionDefine;
  34. declare type SeriesDimensionLoose = DimensionLoose;
  35. declare type SeriesDimensionName = DimensionName;
  36. export interface DefaultDataVisual {
  37. style: PathStyleProps;
  38. drawType: 'fill' | 'stroke';
  39. symbol?: string;
  40. symbolSize?: number | number[];
  41. symbolRotate?: number;
  42. symbolKeepAspect?: boolean;
  43. symbolOffset?: string | number | (string | number)[];
  44. liftZ?: number;
  45. legendIcon?: string;
  46. legendLineStyle?: LineStyleProps;
  47. visualMeta?: VisualMeta[];
  48. colorFromPalette?: boolean;
  49. decal?: DecalObject;
  50. }
  51. export interface DataCalculationInfo<SERIES_MODEL> {
  52. stackedDimension: DimensionName;
  53. stackedByDimension: DimensionName;
  54. isStackedByIndex: boolean;
  55. stackedOverDimension: DimensionName;
  56. stackResultDimension: DimensionName;
  57. stackedOnSeries?: SERIES_MODEL;
  58. }
  59. declare class SeriesData<HostModel extends Model = Model, Visual extends DefaultDataVisual = DefaultDataVisual> {
  60. readonly type = "list";
  61. /**
  62. * Name of dimensions list of SeriesData.
  63. *
  64. * @caution Carefully use the index of this array.
  65. * Becuase when DataStore is an extra high dimension(>30) dataset. We will only pick
  66. * the used dimensions from DataStore to avoid performance issue.
  67. */
  68. readonly dimensions: SeriesDimensionName[];
  69. private _dimInfos;
  70. private _dimOmitted;
  71. private _schema?;
  72. /**
  73. * @pending
  74. * Actually we do not really need to convert dimensionIndex to dimensionName
  75. * and do not need `_dimIdxToName` if we do everything internally based on dimension
  76. * index rather than dimension name.
  77. */
  78. private _dimIdxToName?;
  79. readonly hostModel: HostModel;
  80. /**
  81. * @readonly
  82. */
  83. dataType: SeriesDataType;
  84. /**
  85. * @readonly
  86. * Host graph if List is used to store graph nodes / edges.
  87. */
  88. graph?: Graph;
  89. /**
  90. * @readonly
  91. * Host tree if List is used to store tree ndoes.
  92. */
  93. tree?: Tree;
  94. private _store;
  95. private _nameList;
  96. private _idList;
  97. private _visual;
  98. private _layout;
  99. private _itemVisuals;
  100. private _itemLayouts;
  101. private _graphicEls;
  102. private _approximateExtent;
  103. private _dimSummary;
  104. private _invertedIndicesMap;
  105. private _calculationInfo;
  106. userOutput: DimensionSummary['userOutput'];
  107. hasItemOption: boolean;
  108. private _nameRepeatCount;
  109. private _nameDimIdx;
  110. private _idDimIdx;
  111. private __wrappedMethods;
  112. TRANSFERABLE_METHODS: readonly ["cloneShallow", "downSample", "lttbDownSample", "map"];
  113. CHANGABLE_METHODS: readonly ["filterSelf", "selectRange"];
  114. DOWNSAMPLE_METHODS: readonly ["downSample", "lttbDownSample"];
  115. /**
  116. * @param dimensionsInput.dimensions
  117. * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...].
  118. * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
  119. */
  120. constructor(dimensionsInput: SeriesDataSchema | SeriesDimensionDefineLoose[], hostModel: HostModel);
  121. /**
  122. *
  123. * Get concrete dimension name by dimension name or dimension index.
  124. * If input a dimension name, do not validate whether the dimension name exits.
  125. *
  126. * @caution
  127. * @param dim Must make sure the dimension is `SeriesDimensionLoose`.
  128. * Because only those dimensions will have auto-generated dimension names if not
  129. * have a user-specified name, and other dimensions will get a return of null/undefined.
  130. *
  131. * @notice Becuause of this reason, should better use `getDimensionIndex` instead, for examples:
  132. * ```js
  133. * const val = data.getStore().get(data.getDimensionIndex(dim), dataIdx);
  134. * ```
  135. *
  136. * @return Concrete dim name.
  137. */
  138. getDimension(dim: SeriesDimensionLoose): DimensionName;
  139. /**
  140. * Get dimension index in data store. Return -1 if not found.
  141. * Can be used to index value from getRawValue.
  142. */
  143. getDimensionIndex(dim: DimensionLoose): DimensionIndex;
  144. /**
  145. * The meanings of the input parameter `dim`:
  146. *
  147. * + If dim is a number (e.g., `1`), it means the index of the dimension.
  148. * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'.
  149. * + If dim is a number-like string (e.g., `"1"`):
  150. * + If there is the same concrete dim name defined in `series.dimensions` or `dataset.dimensions`,
  151. * it means that concrete name.
  152. * + If not, it will be converted to a number, which means the index of the dimension.
  153. * (why? because of the backward compatbility. We have been tolerating number-like string in
  154. * dimension setting, although now it seems that it is not a good idea.)
  155. * For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`,
  156. * if no dimension name is defined as `"1"`.
  157. * + If dim is a not-number-like string, it means the concrete dim name.
  158. * For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`,
  159. * or customized in `dimensions` property of option like `"age"`.
  160. *
  161. * @return recogonized `DimensionIndex`. Otherwise return null/undefined (means that dim is `DimensionName`).
  162. */
  163. private _recognizeDimIndex;
  164. private _getStoreDimIndex;
  165. /**
  166. * Get type and calculation info of particular dimension
  167. * @param dim
  168. * Dimension can be concrete names like x, y, z, lng, lat, angle, radius
  169. * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
  170. */
  171. getDimensionInfo(dim: SeriesDimensionLoose): SeriesDimensionDefine;
  172. /**
  173. * If `dimName` if from outside of `SeriesData`,
  174. * use this method other than visit `this._dimInfos` directly.
  175. */
  176. private _getDimInfo;
  177. private _initGetDimensionInfo;
  178. /**
  179. * concrete dimension name list on coord.
  180. */
  181. getDimensionsOnCoord(): SeriesDimensionName[];
  182. /**
  183. * @param coordDim
  184. * @param idx A coordDim may map to more than one data dim.
  185. * If not specified, return the first dim not extra.
  186. * @return concrete data dim. If not found, return null/undefined
  187. */
  188. mapDimension(coordDim: SeriesDimensionName): SeriesDimensionName;
  189. mapDimension(coordDim: SeriesDimensionName, idx: number): SeriesDimensionName;
  190. mapDimensionsAll(coordDim: SeriesDimensionName): SeriesDimensionName[];
  191. getStore(): DataStore;
  192. /**
  193. * Initialize from data
  194. * @param data source or data or data store.
  195. * @param nameList The name of a datum is used on data diff and
  196. * default label/tooltip.
  197. * A name can be specified in encode.itemName,
  198. * or dataItem.name (only for series option data),
  199. * or provided in nameList from outside.
  200. */
  201. initData(data: Source | OptionSourceData | DataStore | DataProvider, nameList?: string[], dimValueGetter?: DimValueGetter): void;
  202. /**
  203. * Caution: Can be only called on raw data (before `this._indices` created).
  204. */
  205. appendData(data: ArrayLike<any>): void;
  206. /**
  207. * Caution: Can be only called on raw data (before `this._indices` created).
  208. * This method does not modify `rawData` (`dataProvider`), but only
  209. * add values to store.
  210. *
  211. * The final count will be increased by `Math.max(values.length, names.length)`.
  212. *
  213. * @param values That is the SourceType: 'arrayRows', like
  214. * [
  215. * [12, 33, 44],
  216. * [NaN, 43, 1],
  217. * ['-', 'asdf', 0]
  218. * ]
  219. * Each item is exaclty cooresponding to a dimension.
  220. */
  221. appendValues(values: any[][], names?: string[]): void;
  222. private _updateOrdinalMeta;
  223. private _shouldMakeIdFromName;
  224. private _doInit;
  225. /**
  226. * PENDING: In fact currently this function is only used to short-circuit
  227. * the calling of `scale.unionExtentFromData` when data have been filtered by modules
  228. * like "dataZoom". `scale.unionExtentFromData` is used to calculate data extent for series on
  229. * an axis, but if a "axis related data filter module" is used, the extent of the axis have
  230. * been fixed and no need to calling `scale.unionExtentFromData` actually.
  231. * But if we add "custom data filter" in future, which is not "axis related", this method may
  232. * be still needed.
  233. *
  234. * Optimize for the scenario that data is filtered by a given extent.
  235. * Consider that if data amount is more than hundreds of thousand,
  236. * extent calculation will cost more than 10ms and the cache will
  237. * be erased because of the filtering.
  238. */
  239. getApproximateExtent(dim: SeriesDimensionLoose): [number, number];
  240. /**
  241. * Calculate extent on a filtered data might be time consuming.
  242. * Approximate extent is only used for: calculte extent of filtered data outside.
  243. */
  244. setApproximateExtent(extent: [number, number], dim: SeriesDimensionLoose): void;
  245. getCalculationInfo<CALC_INFO_KEY extends keyof DataCalculationInfo<HostModel>>(key: CALC_INFO_KEY): DataCalculationInfo<HostModel>[CALC_INFO_KEY];
  246. /**
  247. * @param key or k-v object
  248. */
  249. setCalculationInfo(key: DataCalculationInfo<HostModel>): void;
  250. setCalculationInfo<CALC_INFO_KEY extends keyof DataCalculationInfo<HostModel>>(key: CALC_INFO_KEY, value: DataCalculationInfo<HostModel>[CALC_INFO_KEY]): void;
  251. /**
  252. * @return Never be null/undefined. `number` will be converted to string. Becuase:
  253. * In most cases, name is used in display, where returning a string is more convenient.
  254. * In other cases, name is used in query (see `indexOfName`), where we can keep the
  255. * rule that name `2` equals to name `'2'`.
  256. */
  257. getName(idx: number): string;
  258. private _getCategory;
  259. /**
  260. * @return Never null/undefined. `number` will be converted to string. Becuase:
  261. * In all cases having encountered at present, id is used in making diff comparison, which
  262. * are usually based on hash map. We can keep the rule that the internal id are always string
  263. * (treat `2` is the same as `'2'`) to make the related logic simple.
  264. */
  265. getId(idx: number): string;
  266. count(): number;
  267. /**
  268. * Get value. Return NaN if idx is out of range.
  269. *
  270. * @notice Should better to use `data.getStore().get(dimIndex, dataIdx)` instead.
  271. */
  272. get(dim: SeriesDimensionName, idx: number): ParsedValue;
  273. /**
  274. * @notice Should better to use `data.getStore().getByRawIndex(dimIndex, dataIdx)` instead.
  275. */
  276. getByRawIndex(dim: SeriesDimensionName, rawIdx: number): ParsedValue;
  277. getIndices(): globalThis.ArrayLike<number>;
  278. getDataExtent(dim: DimensionLoose): [number, number];
  279. getSum(dim: DimensionLoose): number;
  280. getMedian(dim: DimensionLoose): number;
  281. /**
  282. * Get value for multi dimensions.
  283. * @param dimensions If ignored, using all dimensions.
  284. */
  285. getValues(idx: number): ParsedValue[];
  286. getValues(dimensions: readonly DimensionName[], idx: number): ParsedValue[];
  287. /**
  288. * If value is NaN. Inlcuding '-'
  289. * Only check the coord dimensions.
  290. */
  291. hasValue(idx: number): boolean;
  292. /**
  293. * Retreive the index with given name
  294. */
  295. indexOfName(name: string): number;
  296. getRawIndex(idx: number): number;
  297. indexOfRawIndex(rawIndex: number): number;
  298. /**
  299. * Only support the dimension which inverted index created.
  300. * Do not support other cases until required.
  301. * @param dim concrete dim
  302. * @param value ordinal index
  303. * @return rawIndex
  304. */
  305. rawIndexOf(dim: SeriesDimensionName, value: OrdinalNumber): number;
  306. /**
  307. * Retreive the index of nearest value
  308. * @param dim
  309. * @param value
  310. * @param [maxDistance=Infinity]
  311. * @return If and only if multiple indices has
  312. * the same value, they are put to the result.
  313. */
  314. indicesOfNearest(dim: DimensionLoose, value: number, maxDistance?: number): number[];
  315. /**
  316. * Data iteration
  317. * @param ctx default this
  318. * @example
  319. * list.each('x', function (x, idx) {});
  320. * list.each(['x', 'y'], function (x, y, idx) {});
  321. * list.each(function (idx) {})
  322. */
  323. each<Ctx>(cb: EachCb0<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
  324. each<Ctx>(dims: DimensionLoose, cb: EachCb1<Ctx>, ctx?: Ctx): void;
  325. each<Ctx>(dims: [DimensionLoose], cb: EachCb1<Ctx>, ctx?: Ctx): void;
  326. each<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: EachCb2<Ctx>, ctx?: Ctx): void;
  327. each<Ctx>(dims: ItrParamDims, cb: EachCb<Ctx>, ctx?: Ctx): void;
  328. /**
  329. * Data filter
  330. */
  331. filterSelf<Ctx>(cb: FilterCb0<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): this;
  332. filterSelf<Ctx>(dims: DimensionLoose, cb: FilterCb1<Ctx>, ctx?: Ctx): this;
  333. filterSelf<Ctx>(dims: [DimensionLoose], cb: FilterCb1<Ctx>, ctx?: Ctx): this;
  334. filterSelf<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: FilterCb2<Ctx>, ctx?: Ctx): this;
  335. filterSelf<Ctx>(dims: ItrParamDims, cb: FilterCb<Ctx>, ctx?: Ctx): this;
  336. /**
  337. * Select data in range. (For optimization of filter)
  338. * (Manually inline code, support 5 million data filtering in data zoom.)
  339. */
  340. selectRange(range: Record<string, [number, number]>): SeriesData;
  341. /**
  342. * Data mapping to a plain array
  343. */
  344. mapArray<Ctx, Cb extends MapArrayCb0<Ctx>>(cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
  345. mapArray<Ctx, Cb extends MapArrayCb1<Ctx>>(dims: DimensionLoose, cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
  346. mapArray<Ctx, Cb extends MapArrayCb1<Ctx>>(dims: [DimensionLoose], cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
  347. mapArray<Ctx, Cb extends MapArrayCb2<Ctx>>(dims: [DimensionLoose, DimensionLoose], cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
  348. mapArray<Ctx, Cb extends MapArrayCb<Ctx>>(dims: ItrParamDims, cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
  349. /**
  350. * Data mapping to a new List with given dimensions
  351. */
  352. map<Ctx>(dims: DimensionLoose, cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): SeriesData<HostModel>;
  353. map<Ctx>(dims: [DimensionLoose], cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): SeriesData<HostModel>;
  354. map<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: MapCb2<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): SeriesData<HostModel>;
  355. /**
  356. * !!Danger: used on stack dimension only.
  357. */
  358. modify<Ctx>(dims: DimensionLoose, cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
  359. modify<Ctx>(dims: [DimensionLoose], cb: MapCb1<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
  360. modify<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: MapCb2<Ctx>, ctx?: Ctx, ctxCompat?: Ctx): void;
  361. /**
  362. * Large data down sampling on given dimension
  363. * @param sampleIndex Sample index for name and id
  364. */
  365. downSample(dimension: DimensionLoose, rate: number, sampleValue: (frameValues: ArrayLike<ParsedValue>) => ParsedValueNumeric, sampleIndex: (frameValues: ArrayLike<ParsedValue>, value: ParsedValueNumeric) => number): SeriesData<HostModel>;
  366. /**
  367. * Large data down sampling using largest-triangle-three-buckets
  368. * @param {string} valueDimension
  369. * @param {number} targetCount
  370. */
  371. lttbDownSample(valueDimension: DimensionLoose, rate: number): SeriesData<HostModel>;
  372. getRawDataItem(idx: number): OptionDataItem;
  373. /**
  374. * Get model of one data item.
  375. */
  376. getItemModel<ItemOpts extends unknown = unknown>(idx: number): Model<ItemOpts>;
  377. /**
  378. * Create a data differ
  379. */
  380. diff(otherList: SeriesData): DataDiffer;
  381. /**
  382. * Get visual property.
  383. */
  384. getVisual<K extends keyof Visual>(key: K): Visual[K];
  385. /**
  386. * Set visual property
  387. *
  388. * @example
  389. * setVisual('color', color);
  390. * setVisual({
  391. * 'color': color
  392. * });
  393. */
  394. setVisual<K extends keyof Visual>(key: K, val: Visual[K]): void;
  395. setVisual(kvObj: Partial<Visual>): void;
  396. /**
  397. * Get visual property of single data item
  398. */
  399. getItemVisual<K extends keyof Visual>(idx: number, key: K): Visual[K];
  400. /**
  401. * If exists visual property of single data item
  402. */
  403. hasItemVisual(): boolean;
  404. /**
  405. * Make sure itemVisual property is unique
  406. */
  407. ensureUniqueItemVisual<K extends keyof Visual>(idx: number, key: K): Visual[K];
  408. /**
  409. * Set visual property of single data item
  410. *
  411. * @param {number} idx
  412. * @param {string|Object} key
  413. * @param {*} [value]
  414. *
  415. * @example
  416. * setItemVisual(0, 'color', color);
  417. * setItemVisual(0, {
  418. * 'color': color
  419. * });
  420. */
  421. setItemVisual<K extends keyof Visual>(idx: number, key: K, value: Visual[K]): void;
  422. setItemVisual(idx: number, kvObject: Partial<Visual>): void;
  423. /**
  424. * Clear itemVisuals and list visual.
  425. */
  426. clearAllVisual(): void;
  427. /**
  428. * Set layout property.
  429. */
  430. setLayout(key: string, val: any): void;
  431. setLayout(kvObj: Dictionary<any>): void;
  432. /**
  433. * Get layout property.
  434. */
  435. getLayout(key: string): any;
  436. /**
  437. * Get layout of single data item
  438. */
  439. getItemLayout(idx: number): any;
  440. /**
  441. * Set layout of single data item
  442. */
  443. setItemLayout<M = false>(idx: number, layout: (M extends true ? Dictionary<any> : any), merge?: M): void;
  444. /**
  445. * Clear all layout of single data item
  446. */
  447. clearItemLayouts(): void;
  448. /**
  449. * Set graphic element relative to data. It can be set as null
  450. */
  451. setItemGraphicEl(idx: number, el: Element): void;
  452. getItemGraphicEl(idx: number): Element;
  453. eachItemGraphicEl<Ctx = unknown>(cb: (this: Ctx, el: Element, idx: number) => void, context?: Ctx): void;
  454. /**
  455. * Shallow clone a new list except visual and layout properties, and graph elements.
  456. * New list only change the indices.
  457. */
  458. cloneShallow(list?: SeriesData<HostModel>): SeriesData<HostModel>;
  459. /**
  460. * Wrap some method to add more feature
  461. */
  462. wrapMethod(methodName: FunctionPropertyNames<SeriesData>, injectFunction: (...args: any) => any): void;
  463. private static internalField;
  464. }
  465. interface SeriesData {
  466. getLinkedData(dataType?: SeriesDataType): SeriesData;
  467. getLinkedDataAll(): {
  468. data: SeriesData;
  469. type?: SeriesDataType;
  470. }[];
  471. }
  472. export default SeriesData;