diff --git a/src/model/Series.ts b/src/model/Series.ts index 89be20c7d1..94e630fc17 100644 --- a/src/model/Series.ts +++ b/src/model/Series.ts @@ -347,7 +347,7 @@ class SeriesModel extends ComponentMode const task = getCurrentTask(this); if (task) { const data = task.context.data; - return (dataType == null ? data : data.getLinkedData(dataType)) as SeriesData; + return (dataType == null || !data.getLinkedData ? data : data.getLinkedData(dataType)) as SeriesData; } else { // When series is not alive (that may happen when click toolbox diff --git a/test/graph-case.html b/test/graph-case.html index 4523593c7b..8112b80af9 100644 --- a/test/graph-case.html +++ b/test/graph-case.html @@ -40,7 +40,7 @@
- +
@@ -209,6 +209,256 @@ }); }); + + diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json index bf0a57e027..a7aba928f7 100644 --- a/test/runTest/actions/__meta__.json +++ b/test/runTest/actions/__meta__.json @@ -101,7 +101,7 @@ "geoScatter": 1, "getOption": 1, "graph": 2, - "graph-case": 2, + "graph-case": 3, "graph-grid": 1, "graph-simple": 2, "graphic-animation": 1, diff --git a/test/runTest/actions/graph-case.json b/test/runTest/actions/graph-case.json index a4f3458490..aae562b884 100644 --- a/test/runTest/actions/graph-case.json +++ b/test/runTest/actions/graph-case.json @@ -1 +1 @@ -[{"name":"Action 1","ops":[{"type":"mousemove","time":475,"x":416,"y":188},{"type":"mousemove","time":675,"x":406,"y":208},{"type":"mousedown","time":848,"x":406,"y":210},{"type":"mousemove","time":881,"x":406,"y":210},{"type":"mouseup","time":979,"x":406,"y":210},{"time":980,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1837,"x":406,"y":210},{"type":"mouseup","time":1988,"x":406,"y":210},{"time":1989,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2341,"x":406,"y":211},{"type":"mousemove","time":2541,"x":415,"y":180}],"scrollY":334,"scrollX":0,"timestamp":1684056156749},{"name":"Action 2","ops":[{"type":"mousedown","time":677,"x":43,"y":180},{"type":"mousemove","time":683,"x":43,"y":180},{"type":"mouseup","time":853,"x":43,"y":180},{"time":854,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":886,"x":43,"y":180}],"scrollY":833,"scrollX":0,"timestamp":1705353513922}] \ No newline at end of file +[{"name":"Action 1","ops":[{"type":"mousemove","time":475,"x":416,"y":188},{"type":"mousemove","time":675,"x":406,"y":208},{"type":"mousedown","time":848,"x":406,"y":210},{"type":"mousemove","time":881,"x":406,"y":210},{"type":"mouseup","time":979,"x":406,"y":210},{"time":980,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1837,"x":406,"y":210},{"type":"mouseup","time":1988,"x":406,"y":210},{"time":1989,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2341,"x":406,"y":211},{"type":"mousemove","time":2541,"x":415,"y":180}],"scrollY":334,"scrollX":0,"timestamp":1684056156749},{"name":"Action 2","ops":[{"type":"mousedown","time":677,"x":43,"y":180},{"type":"mousemove","time":683,"x":43,"y":180},{"type":"mouseup","time":853,"x":43,"y":180},{"time":854,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":886,"x":43,"y":180}],"scrollY":833,"scrollX":0,"timestamp":1705353513922},{"name":"Action 3","ops":[{"type":"mousemove","time":222,"x":497,"y":223},{"type":"mousemove","time":422,"x":507,"y":274},{"type":"mousemove","time":635,"x":519,"y":293},{"type":"mousemove","time":1158,"x":520,"y":294},{"type":"mousemove","time":1358,"x":602,"y":295},{"type":"mousemove","time":1559,"x":607,"y":295},{"type":"mousemove","time":1826,"x":610,"y":297},{"type":"mousemove","time":2063,"x":612,"y":299},{"type":"mousemove","time":2678,"x":613,"y":300},{"type":"mousemove","time":2887,"x":651,"y":292},{"type":"mousemove","time":3094,"x":665,"y":294},{"type":"mousemove","time":3298,"x":672,"y":301}],"scrollY":1309,"scrollX":0,"timestamp":1715075160362}] \ No newline at end of file