echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] tree使用visualMap为piecewise时,symbol设置为字符串不生效

Open yaodd123 opened this issue 3 years ago • 3 comments

Version

5.3.0

Link to Minimal Reproduction

No response

Steps to Reproduce

option = {
      backgroundColor: '#',
      series: [
        {
          data: [
            {
              name: '中国',
              value: [46, 41, 'a'],
              children: [
                {
                  "name": "北京",
                  value: [46, 41, '2']
                },
                {
                  "name": "上海",
                  value: [46, 41, '3']
                }
              ]
            }
          ],
          id: '0',
          label: {
            color: '#fff',
            distance: 5,
            fontSize: 12,
            fontWeight: 'normal',
            formatter: '{b}',
            offset: [0, 0],
            position: 'top',
            rich: {},
            rotate: 0,
            show: true
          },
          name: 'a',
          type: 'tree'
        }
      ],
      visualMap: [
        {
          categories: ['a', '2', '3'],
          dimension: 2,
          id: '0',
          inRange: {
            symbol: {
              'a': 'circle',
              '2': 'rect',
              '3': 'diamond'
            }
          },
          left: 'left',
          orient: 'vertical',
          show: true,
          textStyle: {
            color: '#f1f1f1',
            fontSize: 14,
            fontWeight: 'bold'
          },
          type: 'piecewise'
        }
      ]
    }

Current Behavior

inRange: { symbol: { 'a': 'circle', '2': 'rect', '3': 'diamond' } } 中使用数字,数字类型的字符串都可以,使用其他字符串例如’a',形状就显示不出来了。在散点图中未发现这个问题。

Expected Behavior

使用任意字符串,形状视觉映射都应该正常显示

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

yaodd123 avatar Feb 16 '22 10:02 yaodd123

@yaodd123 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Bug] When the tree uses visualMap for piecewise, the symbol setting to string does not take effect

echarts-bot[bot] avatar Feb 16 '22 10:02 echarts-bot[bot]

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Feb 16 '24 21:02 github-actions[bot]

bug confirmed for tree/visualMap/categories as symbols

helgasoft avatar Feb 18 '24 03:02 helgasoft