MCPcopy
hub / github.com/apache/echarts / appendData

Method appendData

src/data/DataStore.ts:325–343  ·  view source on GitHub ↗

* Caution: Can be only called on raw data (before `this._indices` created).

(data: ArrayLike<any>)

Source from the content-addressed store, hash-verified

323 * Caution: Can be only called on raw data (before `this._indices` created).
324 */
325 appendData(data: ArrayLike<any>): number[] {
326 if (__DEV__) {
327 assert(!this._indices, 'appendData can only be called on raw data.');
328 }
329
330 const provider = this._provider;
331 const start = this.count();
332 provider.appendData(data);
333 let end = provider.count();
334 if (!provider.persistent) {
335 end += start;
336 }
337
338 if (start < end) {
339 this._initDataFromProvider(start, end, true);
340 }
341
342 return [start, end];
343 }
344
345 appendValues(values: any[][], minFillLen?: number): { start: number; end: number } {
346 const chunks = this._chunks;

Callers

nothing calls this directly

Calls 5

countMethod · 0.95
_initDataFromProviderMethod · 0.95
appendDataMethod · 0.65
countMethod · 0.65
assertFunction · 0.50

Tested by

no test coverage detected