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

Function diffData

src/chart/line/lineAnimationDiff.ts:33–49  ·  view source on GitHub ↗
(oldData: SeriesData, newData: SeriesData)

Source from the content-addressed store, hash-verified

31}
32
33function diffData(oldData: SeriesData, newData: SeriesData) {
34 const diffResult: DiffItem[] = [];
35
36 newData.diff(oldData)
37 .add(function (idx) {
38 diffResult.push({cmd: '+', idx: idx});
39 })
40 .update(function (newIdx, oldIdx) {
41 diffResult.push({cmd: '=', idx: oldIdx, idx1: newIdx});
42 })
43 .remove(function (idx) {
44 diffResult.push({cmd: '-', idx: idx});
45 })
46 .execute();
47
48 return diffResult;
49}
50
51export default function lineAnimationDiff(
52 oldData: SeriesData, newData: SeriesData,

Callers 1

lineAnimationDiffFunction · 0.85

Calls 5

executeMethod · 0.80
diffMethod · 0.80
removeMethod · 0.65
updateMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…