apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.59k stars 19.62k forks source link

The symboloffset of echarts5 is invalid #15501

Closed Jef-Z closed 3 years ago

Jef-Z commented 3 years ago

Version

5.0.0

Steps to reproduce

The symboloffset of echarts5 is invalid, and echarts4 can be used normally. Code example:

option = {
  xAxis: [
    {
      type: 'category',
      data: ['2018-01', '2018-02', '2018-03'],
    },
  ],
  yAxis: [
    {
      type: 'value',
      scale: true,
    },
  ],
  series: [
    {
      name: 'aaa',
      type: 'bar',
      data: [
        { value: 73, ranking: 23 },
        { value: 69, ranking: 24 },
        { value: 78, ranking: 12 },
      ],
      markPoint: {
        symbol: 'path://M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z',
        symbolOffset: [0, '-100%'],
        data: [{ coord: [0, 73, 23] }, { coord: [1, 69, 24] }, { coord: [2, 78, 12] }],
        itemStyle: {
          normal: {
            label: {
              show: true,
              textBorderWidth: 0,
              textBorderColor: '#f00',
              shadowColor: '#f00',
              color: '#fff',
              formatter: function (params) {
                return params.data.coord[2]   '名';
              },
            },
          },
        },
      },
    },
  ],
};

Please run with echarts5 and echarts4.

What is expected?

echarts5 :symboloffset behaves normally

What is actually happening?

echarts5 :symboloffset has no effect

echarts-bot[bot] commented 3 years ago

Hi! We've received your issue and please be patient to get responded. 🎉 The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.

A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

plainheart commented 3 years ago

Fixed in #14737. It will be released in the next version 5.2.0.