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] 散点图设置invadeType为ignore, 导致图例聚焦时报错. #2625

Closed
youngwinds opened this issue May 6, 2024 · 0 comments
Closed
Assignees
Labels
bp bug Something isn't working

Comments

@youngwinds
Copy link
Contributor

核心问题路径: ignoreType功能, 第一次调用setMarkStyle设置visible为函数, 后续第二次调用, 设置为boolean值.
Image

报错位置: computeStateStyle中, 遇到visible为function
Image

复现问题的spec:


const spec = {
    type: 'scatter',
    xField: '211222162144441',
    yField: '211222162144469',
    invalidType: 'ignore',
    labelLayout: 'region',
    data: [
      {
        id: 'data',
        values: [
          {
            '30001': 'VQAXZZZZZZZTEST',
            '211222162144441': '0.1313127765680973',
            '211222162144469': '127.6478893025216',
            '240426173747031': 'TAY',
            '240426175156017': 'VQAXZZZZZZZTEST',
            '240506111642070': '215.71212121212122'
          },
          {
            '30001': 'CC',
            '211222162144441': null,
            '211222162144469': '5.833333333333333',
            '240426173747031': 'xxxx_and_other_asdasdqqwewq',
            '240426175156017': 'CC',
            '240506111642070': '1.2'
          }
        ],
        fields: {
          '30001': {
            alias: 'ffasdadas '
          },
          '211222162144441': {
            alias: 'fff'
          },
          '211222162144469': {
            alias: 'ffffVV'
          },
          '240426173747031': {
            alias: 'region_group',

            sortIndex: 0
          },
          '240426175156017': {
            alias: 'Region'
          },
          '240506111642070': {
            alias: 'aAAAAAaaaaaa_dnu'
          }
        }
      }
    ],
    axes: [
      {
        type: 'linear',
        orient: 'bottom'
      }
    ],

    legends: [
      {
        type: 'discrete',
        visible: true,
        id: 'legend-discrete',
        orient: 'right',
        position: 'middle',
        layoutType: 'normal-inline',
        maxCol: 1,
        title: {
          textStyle: {
            fontSize: 12,
            fill: '#6F6F6F'
          }
        },
        layoutLevel: 60,
        item: {
          focus: true,
          focusIconStyle: {
            size: 14
          },
          maxWidth: 257,
          spaceRow: 0,
          spaceCol: 0,
          padding: {
            top: 1,
            bottom: 2,
            left: 3,
            right: 2
          },
          background: {
            visible: true,
            style: {
              fillOpacity: 0.001
            }
          },
          label: {
            style: {
              fontSize: 12,
              fill: '#6F6F6F'
            }
          },
          shape: {
            style: {
              lineWidth: 0,
              symbolType: 'square',
              size: 10,
              fillOpacity: 1
            }
          }
        },
        pager: {
          layout: 'horizontal',
          padding: {
            left: -18
          },
          textStyle: {},
          space: 0,
          handler: {
            TTEESSTTAeShape: 'triangleLeft',
            nextShape: 'triangleRight',
            style: {},
            state: {
              diAAAAAble: {}
            }
          }
        },
        alignSelf: 'end',
        padding: {
          top: 0,
          bottom: 12,
          left: 16,
          right: 0
        }
      },
      {
        type: 'size',
        slidable: true,
        visible: true,
        title: {
          visible: true,
          text: 'aAAAAAaaaaaa_dnu',
          textStyle: {
            fontSize: 12,
            fill: '#6F6F6F'
          },
          space: 0
        },
        handlerText: {
          style: {
            maxLineWidth: 50,
            fontSize: 12,
            fill: '#6F6F6F',
            textAlign: 'start',
            dx: 30
          }
        },
        id: 'legend-size',
        orient: 'right',
        position: 'middle',
        layoutType: 'normal-inline',
        field: ['240506111642070'],
        layoutLevel: 50,
        maxHeight: 130,
        track: {
          style: {
            fill: 'rgba(20,20,20,0.1)'
          }
        },
        rxxxxxxxxl: {
          height: 100
        },
        handler: {
          style: {
            symbolType: 'M-5,0L-2.5,-3.5\n    h5\n    v7\n    h-5\n    Z',
            size: 8,
            shadowBlur: 0,
            shadowColor: true,
            outerBorder: {
              stroke: '#AEB8C6',
              lineWidth: 1,
              strokeOpacity: 0.5
            }
          }
        },
        align: 'left',
        alignSelf: 'end',
        startText: {
          visible: true
        },
        endText: {
          visible: true
        },
        padding: {
          top: 0,
          bottom: 12,
          left: 16,
          right: 0
        }
      }
    ],
    seriesField: '240426173747031',
    sizeField: '240506111642070'
  };
@youngwinds youngwinds added bug Something isn't working bp labels May 6, 2024
@xile611 xile611 mentioned this issue May 7, 2024
20 tasks
@xile611 xile611 closed this as completed in e3cd9b6 May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bp bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants