VChart icon indicating copy to clipboard operation
VChart copied to clipboard

[Bug] 当spec中没有series时,内置的specInfo逻辑会丢失需要索引series的模块

Open xuefei1313 opened this issue 1 year ago • 0 comments

Version

1.19.5

Link to Minimal Reproduction

null

Steps to Reproduce

使用下方spec可以debug vchart._specInfo

const spec = {
  type: 'bar',
  theme: {},
  xField: ['220802173718012', '20001'],
  yField: ['10002'],
  direction: 'vertical',
  seriesField: '20001',
  data: [
    {
      id: 'data',
      values: [
        {
          '10001': 'DAU',
          '10002': '86852',
          '10003': '220802173718014',
          '20001': '2021',
          '220802173718012': '06-18',
          '220802173718013': '2021',
          '220802173718014': '86852'
        },
        {
          '10001': 'DAU',
          '10002': '79262',
          '10003': '220802173718014',
          '20001': '2020',
          '220802173718012': '06-18',
          '220802173718013': '2020',
          '220802173718014': '79262'
        }
      ]
    }
  ],
  axes: [
    {
      id: 'axes_0',
      type: 'band',
      orient: 'bottom',
      visible: true
    },
    {
      id: 'axes_1',
      type: 'linear',
      niceType: 'accurateFirst',
      orient: 'left',
      visible: true,
      zero: true,
      nice: true
    }
  ],
  label: {
    visible: true,
    position: 'inside'
  },
  animation: false,
  width: 640,
  height: 360
};

Current Behavior

vchart._seriesInfo中没有series和component.label

Expected Behavior

信息正常

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

xuefei1313 avatar Jul 11 '24 12:07 xuefei1313