镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[Bug] Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'type') at HeatmapView2.render (HeatmapView.js:137:18) #19060

Closed

Description

@mmclofe

Version

5.4.3

Link to Minimal Reproduction

<script lang="ts" setup> // import VChart from 'vue-echarts'; import 'echarts/lib/chart/heatmap' import 'echarts/lib/component/calendar' // const option = ref({ // animation: false, // bmap: { // center: [120.13066322374, 30.240018034923], // zoom: 14, // roam: true // }, // visualMap: { // show: false, // top: 'top', // min: 0, // max: 5, // seriesIndex: 0, // calculable: true, // inRange: { // color: ['blue', 'blue', 'green', 'yellow', 'red'] // } // }, // series: [ // { // type: 'heatmap', // coordinateSystem: 'calendar', // data: [], // pointSize: 5, // blurSize: 6 // } // ] // }); // type HotMapDataModel = { // lng:number; // count:number; // lat:number; // } // const props = defineProps<{ // hotMapData:HotMapDataModel[] // }>() const { $eChart } = useNuxtApp() const hotMapRef = ref() const initHotMap = () => { // 添加百度地图插件 const myChart = $eChart.init(hotMapRef.value) myChart.setOption({ animation: false, bmap: { center: [120.13066322374, 30.240018034923], zoom: 14, roam: true }, visualMap: { show: false, top: 'top', min: 0, max: 5, seriesIndex: 0, calculable: true, inRange: { color: ['blue', 'blue', 'green', 'yellow', 'red'] } }, series: [ { type: 'heatmap', coordinateSystem: 'calendar', data: [], pointSize: 5, blurSize: 6 } ] }) let bmap = (myChart as any).getModel().getComponent('bmap').getBMap(); bmap.addControl(new BMap.MapTypeControl()); } onMounted(() => { initHotMap() }) </script> <style lang="scss" scoped> </style>

Steps to Reproduce

1、当使用热力图时,无论coordinateSystem配置“calendar”还是‘bmap’都会导致这个问题

Current Behavior

image
image

Expected Behavior

使用热力图正确

Environment

- OS:windows
- Browser:chorme
- Framework:

Any additional comments?

No response

Activity

  1. added
    enThis issue is in English
    pendingWe are not sure about whether this is a bug/new feature.
    on Aug 31, 2023
  2. mmclofe commented on Aug 31, 2023

    @mmclofe
    Author

    image
    这是代码截图

  3. mmclofe commented on Aug 31, 2023

    @mmclofe
    Author

    基于nuxt3的框架

  4. andyesfly commented on Oct 11, 2024

    @andyesfly

    问题解决了吗?

  5. aloktomarr commented on Jul 17, 2026

    @aloktomarr

    I would love to fix this issue.

    Root cause: HeatmapView.render reads seriesModel.coordinateSystem.type
    without checking that the coordinate system was resolved.

    When a heatmap references a coordinate system whose component is missing (e.g. coordinateSystem: 'calendar'/'bmap' not registered), coordinateSystem is undefined, so coordSys.type throws Cannot read properties of undefined (reading 'type') and the whole render aborts. Notably, incrementalRender already guards this with if (coordSys); render was missing the same check.

    Fix: add the same if (!coordSys) return; guard in render so a misconfigured/unresolved coordinate system is skipped gracefully (ECharts still logs its usual "coordinate system cannot be found" warning) instead of crashing. Added a regression test. PR incoming.

  6. added a commit that references this issue on Jul 20, 2026
    c6741a7
  7. added and removed
    pendingWe are not sure about whether this is a bug/new feature.
    on Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions