echarts [Bug] graph vertical edge lines has wrong position

jvlzgdj9  于 4个月前  发布在  Echarts
关注(0)|答案(3)|浏览(61)

Version

5.4.3

https://codepen.io/igincui/pen/LYMMeOE

Steps to Reproduce

  1. How do you create the chart.
    Open the codepen link: https://codepen.io/igincui/pen/LYMMeOE
  2. What's the chart option
option = {
  series: [
    {
      type: 'graph',
      symbolSize: [23, 28],
      itemStyle: { opacity: 0.5, color: 'green' },
      lineStyle: { opacity: 1.0, color: 'red' },
      data: [
        {
          id: 'start',
          x: -10,
          y: 570,
          symbol: 'path://M 0 0 h23 v28 h-23 v-28 z'
        },
        {
          id: 'a',
          x: -10,
          y: 560,
          symbol: 'path://M 0 0 h23 v28 h-23 v-28 z'
        },
        {
          id: 'b',
          x: 0,
          y: 560,
          symbol: 'path://M 0 0 h23 v28 h-23 v-28 z'
        },
      ],
      links: [
        {
          source: 'start',
          target: 'a'
        },
        {
          source: 'start',
          target: 'b'
        },
      ]
    }
  ]
};
  1. User interactions before the error happens.
    None

Current Behavior

The vertical lines have wrong positions, do not start from and end to the center of symbols.

Expected Behavior

The vertical lines should have correct positions, start from and end to the center of symbols.

Environment

- OS: Win 10 (64-bit)
- Browser: Chrome Version 117.0.5938.149 (Official Build) (64-bit)
- Framework: None

Any additional comments?

No response

m2xkgtsf

m2xkgtsf1#

workaround - use coordinates at least an order of magnitude bigger than symbol dimensions
Demo Code

csga3l58

csga3l582#

workaround - use coordinates at least an order of magnitude bigger than symbol dimensions

@helgasoft , thanks for your reply.
If you zoom in (need roam:true, ), you still find the vertical line is not from symbol center.

omvjsjqw

omvjsjqw3#

increase the multiplicator mm= 1000; and you can zoom at will.
But remember it's a workaround, not a fix.

相关问题