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

Method setData

src/model/Series.ts:394–417  ·  view source on GitHub ↗
(data: SeriesData)

Source from the content-addressed store, hash-verified

392 }
393
394 setData(data: SeriesData): void {
395 const task = getCurrentTask(this);
396 if (task) {
397 const context = task.context;
398 // Consider case: filter, data sample.
399 // FIXME:TS never used, so comment it
400 // if (context.data !== data && task.modifyOutputEnd) {
401 // task.setOutputEnd(data.count());
402 // }
403 context.outputData = data;
404 // Caution: setData should update context.data,
405 // Because getData may be called multiply in a
406 // single stage and expect to get the data just
407 // set. (For example, AxisProxy, x y both call
408 // getData and setDate sequentially).
409 // So the context.data should be fetched from
410 // upstream each time when a stage starts to be
411 // performed.
412 if (task !== this.dataTask) {
413 context.data = data;
414 }
415 }
416 inner(this).data = data;
417 }
418
419 getEncode() {
420 const encode = (this as Model<SeriesEncodeOptionMixin>).get('encode', true);

Callers 7

mapDataStatisticFunction · 0.80
renderSeriesMethod · 0.80
renderSeriesMethod · 0.80
renderSeriesMethod · 0.80
filterDataMethod · 0.80
dataTaskResetFunction · 0.80
dataSampleFunction · 0.80

Calls 2

getCurrentTaskFunction · 0.85
innerFunction · 0.85

Tested by

no test coverage detected