Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] series同时使用type: 'graph',type: 'lines',series ——type'graph'中配置emphasis: { focus: 'adjacency'},鼠标hover就报错,开发版本中会导致页面崩溃 #19900

Closed
tab91622 opened this issue May 7, 2024 · 0 comments · Fixed by #19901
Labels

Comments

@tab91622
Copy link

tab91622 commented May 7, 2024

Version

5.2.2

Link to Minimal Reproduction

Codesandbox Link

Editor Link

Steps to Reproduce

仅提供option配置,详情可打开链接的在线案例,查看**【Demo3】**

{
      xAxis: {
        show: false,
        type: 'value',
        min: 0,
        max: CW,
      },
      yAxis: {
        show: false,
        type: 'value',
        min: 0,
        max: CH,
      },
      series: [
        {
          z: 3,
          draggable: true,
          // 只能缩放
          roam: "scale",
          // 标签
          label: {
            show: true,
            // 定位上方
            position: 'bottom',
            // 字体设置
            color: "black",
            fontWeight: "bold"
          },
          data: json.nodes.map(node => {
            return {
              value: [node.x, node.y],
              id: node.id,
              name: node.name,
              symbol: node.symbol,
              symbolSize: node.size,
              attributes: node.attributes,
              itemStyle: {
                color: node.color
              }
            }
          }),
          edges: json.edges,
          lineStyle: {
            color: 'orange',
            curveness: 0,
            width: 1,
            type: "solid",
          },
          name: '马王堆一号+',
          type: 'graph',
          coordinateSystem: 'cartesian2d',
          symbol: 'circle',
          emphasis: {
            focus: 'adjacency',
          },
        },
        {
          name: '线图',
          type: 'lines',
          // 二维直角坐标系
          coordinateSystem: 'cartesian2d',
          // 箭头动画效果
          effect: {
            show: true,
            trailLength: 0,
            symbol: 'circle',
            color: 'red',
            symbolSize: 6,
            // period: 3,
            constantSpeed: 60,
          },
          z: 1,
          data: json.linesData
        },
      ]
    }

Current Behavior

开发版本
series: [{ type: 'graph', emphasis: { focus: 'adjacency' }}, { type: 'lines' }]
同时使用就报错且页面崩溃

Expected Behavior

页面不崩溃即可

Environment

- OS:Windows
- Browser:Edge
- Framework:React

Any additional comments?

No response

@tab91622 tab91622 added the bug label May 7, 2024
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels May 7, 2024
@plainheart plainheart removed pending We are not sure about whether this is a bug/new feature. en This issue is in English labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants