plainheart commented on code in PR #21698:
URL: https://github.com/apache/echarts/pull/21698#discussion_r3609811520
##########
src/chart/heatmap/HeatmapView.ts:
##########
@@ -121,6 +121,13 @@ class HeatmapView extends ChartView {
this.group.removeAll();
const coordSys = seriesModel.coordinateSystem;
+ // The coordinate system may be unresolved, e.g. a heatmap that
+ // references a `calendar`/`geo`/`bmap` coordinate system whose
component
+ // is missing. Skip rendering instead of throwing on `coordSys.type`
+ // (`incrementalRender` already guards this the same way). See #19060.
+ if (!coordSys) {
+ return;
+ }
Review Comment:
Hi, thanks for the contribution! For #19060, it generally happens in a Vue
setup because the ECharts instance can be proxied and
`seriesModel.coordinateSystem` can be lost unexpectedly. See also
https://github.com/apache/echarts/issues/17723#issuecomment-1268311307. For
users on ECharts versions before 6.1.0, the recommended workaround is still to
avoid making the ECharts instance reactive (for example, with `shallowRef` or
`markRaw`); in ECharts 6.1.0 and later, this is no longer necessary. (PR #21293)
In the scenario covered by your regression test, where a series references
an unregistered or undeclared coordinate system, I think your fix makes sense.
It would be even better to emit a development warning/log before returning,
rather than silently skipping the render.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]