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] update animation of radar chart seems strange #3228

Closed
xile611 opened this issue Sep 13, 2024 · 0 comments · Fixed by #3251
Closed

[Bug] update animation of radar chart seems strange #3228

xile611 opened this issue Sep 13, 2024 · 0 comments · Fixed by #3251
Assignees
Labels
bug Something isn't working

Comments

@xile611
Copy link
Contributor

xile611 commented Sep 13, 2024

Version

1.12.5

Link to Minimal Reproduction

no

Steps to Reproduce

const spec = {
  __isSeriesWithinPointsSpec: true,
  __innerSpecType: 'IRadarSpec',
  type: 'radar',
  data: [
    {
      name: 'allData',
      values: [
        {
          index: 0,
          name: '选项1',
          value: 37,
          labelValue: '37',
          dataIndex: 0,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optZBqHB0m-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 1,
          name: '😁',
          value: 4,
          labelValue: '4',
          dataIndex: 1,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optIXjdhhv-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 2,
          name: '123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432',
          value: 20,
          labelValue: '20',
          dataIndex: 2,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'opttz3hazW-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 3,
          name: '哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈',
          value: 10,
          labelValue: '10',
          dataIndex: 3,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optrl6jfh8-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 4,
          name: '!@#¥……&……&&()——+「」',
          value: 1,
          labelValue: '1',
          dataIndex: 4,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optejrD1UU-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 5,
          name: '2022/01/07',
          value: 3,
          labelValue: '3',
          dataIndex: 5,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optvhfuyrQ-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 6,
          name: '☺️🍉🤯😩😂😏😘🤝😁🫱🏾‍🫲🏻❤️👌🏼👌🏼😒🙏😍😊👌😭💕',
          value: 1,
          labelValue: '1',
          dataIndex: 6,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optlo2qH5l-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 7,
          name: '欧吼',
          value: 2,
          labelValue: '2',
          dataIndex: 7,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optk13Lcji-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 8,
          name: '123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432123456789098765432,欧吼,',
          value: 3,
          labelValue: '3',
          dataIndex: 8,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optCeeIuzw-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 9,
          name: '',
          value: 78,
          labelValue: '78',
          dataIndex: 9,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: '123_BITABLE_DASHBOARD_CHART_DIMENSION_DEFAULT_EMPTY_KEY_321-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 10,
          name: 'ipad',
          value: 2,
          labelValue: '2',
          dataIndex: 10,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optKG1pYPu-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 11,
          name: '@宋定艳 ',
          value: 4,
          labelValue: '4',
          dataIndex: 11,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optsbrhh8C-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 12,
          name: 'wjk',
          value: 5,
          labelValue: '5',
          dataIndex: 12,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optlBTi5Jp-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 13,
          name: '12',
          value: 2,
          labelValue: '2',
          dataIndex: 13,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optw11GrNj-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 14,
          name: 'https://cloud-boe.bytedance.net/neptune/interfaceTest?_protol=thrift&_zone=BOE',
          value: 2,
          labelValue: '2',
          dataIndex: 14,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'opt3rpJdsS-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 15,
          name: '1',
          value: 2,
          labelValue: '2',
          dataIndex: 15,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optXkmSzCB-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 16,
          name: '周依婷',
          value: 1,
          labelValue: '1',
          dataIndex: 16,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optSTqAWMY-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        },
        {
          index: 17,
          name: 'https://yapi.bytedance.net/group/71972',
          value: 1,
          labelValue: '1',
          dataIndex: 17,
          group: '_v1kop8ud5',
          groupAlias: '计数',
          seriesIndex: 0,
          isEmpty: false,
          key: 'optzJBoEjO-CHART_COUNT_SERIES',
          seriesKey: 'dmk-CHART_COUNT_SERIES'
        }
      ]
    }
  ],
  categoryField: 'name',
  seriesField: 'group',
  valueField: 'value',
  tooltip: {
    group: {
      visible: false
    }
  },
  legends: {
    orient: 'top',
    position: 'start',
    item: {
      spaceCol: 16,
      spaceRow: 12,
      background: {
        visible: false
      },
      label: {
        style: {
          fontSize: 12
        }
      },
      shape: {
        style: {
          symbolType: 'circle',
          cursor: 'pointer',
          size: 8
        }
      },
      padding: 0,
      maxWidth: 342.0959953125
    },
    pager: {
      textStyle: {
        fillOpacity: 0,
        fontSize: 1
      },
      offsetY: -1,
      handler: {
        style: {
          size: 10,
          fillOpacity: 1,
          fill: '#646a73'
        },
        state: {
          hover: {
            fill: 'rgba(31,35,41,0.1)',
            cursor: 'pointer'
          },
          disable: {
            fill: '#bbbfc4'
          }
        },
        preShape:
          'M 0.2096 0.1229 L 0.2273 0.1052 C 0.237 0.0954 0.237 0.0796 0.2273 0.0698 L 0.0329 -0.1246 C 0.0133 -0.1442 -0.0183 -0.1442 -0.0378 -0.1246 L -0.2323 0.0698 C -0.2421 0.0796 -0.2421 0.0954 -0.2323 0.1052 L -0.2147 0.1229 C -0.2049 0.1326 -0.189 0.1326 -0.1793 0.1229 L -0.0025 -0.0539 L 0.1743 0.1229 C 0.1841 0.1326 0.1998 0.1326 0.2096 0.1229 Z',
        nextShape:
          'M -0.2147 -0.1229 L -0.2323 -0.1052 C -0.2421 -0.0954 -0.2421 -0.0796 -0.2323 -0.0698 L -0.0378 0.1247 C -0.0183 0.1442 0.0133 0.1442 0.0329 0.1247 L 0.2273 -0.0698 C 0.237 -0.0796 0.237 -0.0954 0.2273 -0.1052 L 0.2096 -0.1229 C 0.1998 -0.1326 0.1841 -0.1326 0.1743 -0.1229 L -0.0025 0.0539 L -0.1793 -0.1229 C -0.189 -0.1326 -0.2049 -0.1326 -0.2147 -0.1229 Z'
      },
      width: 22,
      height: 10
    },
    _legendHoverReverseEnabled: true,
    visible: true,
    padding: {
      top: 0,
      bottom: 8,
      left: 0,
      right: 0
    }
  },
  radar: {
    state: {
      legend_hover_reverse: {
        opacity: 0.2
      }
    },
    label: {
      syncState: true,
      state: {
        legend_hover_reverse: {
          opacity: 0.2
        }
      }
    }
  },
  area: {
    visible: true,
    state: {
      legend_hover_reverse: {
        opacity: 0.2
      }
    }
  },
  point: {
    style: {},
    state: {
      hover: {
        style: {
          cursor: 'pointer',
          scaleX: 1.5,
          scaleY: 1.5,
          lineWidth: 2,
          outerBorder: {
            lineWidth: 1,
            stroke: '#4e83fd',
            distance: 4
          },
          fill: '#fff'
        }
      },
      dimension_hover: {
        style: {
          lineWidth: 2,
          fill: '#fff'
        }
      }
    }
  },
  label: {
    visible: true,
    style: {
      stroke: '#ffffff',
      lineWidth: 1
    }
  },
  line: {
    state: {
      legend_hover_reverse: {
        opacity: 0.2
      }
    }
  },
  seriesStyle: [
    {
      name: '_v1kop8ud5',
      area: {
        style: {
          fillOpacity: 0.15,
          curveType: 'linearClosed',
          curveTension: 0.4
        }
      },
      line: {
        style: {
          strokeOpacity: 1,
          lineDash: [1, 0],
          lineCap: 'round',
          lineWidth: 2,
          curveType: 'linearClosed',
          curveTension: 0.4
        }
      }
    }
  ],
  axes: [
    {
      orient: 'angle',
      visible: true,
      clip: false,
      domainLine: {
        visible: false,
        style: {
          stroke: '#BBBFC4',
          lineWidth: 0.5
        }
      },
      grid: {
        visible: true
      },
      label: {
        visible: true,
        autoLimit: true,
        autoWrap: true,
        style: {
          fill: '#646A73',
          fontSize: 12,
          lineHeight: 20,
          fontWeight: 'normal',
          fontStyle: 'normal',
          underline: false,
          lineThrough: false,
          lineClamp: 2
        },
        space: 4
      },
      tick: {
        visible: false
      }
    },
    {
      orient: 'radius',
      visible: true,
      clip: false,
      domainLine: {
        visible: false,
        style: {
          stroke: '#BBBFC4',
          lineWidth: 0.5
        }
      },
      nice: true,
      grid: {
        smooth: false,
        visible: true
      },
      label: {
        visible: true,
        style: {
          fill: '#8F959E',
          fontSize: 12,
          fontWeight: 'normal',
          fontStyle: 'normal',
          underline: false,
          lineThrough: false,
          stroke: '#ffffff',
          lineWidth: 1
        },
        space: 4
      },
      tick: {
        visible: false,
        style: {
          stroke: '#BBBFC4',
          lineWidth: 0.5
        },
        tickSize: 4
      }
    }
  ],
  crosshair: {
    categoryField: {
      visible: true,
      line: {
        style: {
          lineDash: [0, 0],
          stroke: '#bbbfc4',
          lineWidth: 1,
          opacity: 1
        }
      }
    }
  },
  theme: {
    colorScheme: {
      default: ['#3b72f2']
    }
  },
  padding: {
    top: 0,
    left: 20,
    right: 20,
    bottom: 20
  },
  outerRadius: 1
};

浏览器尺寸发生更新的时候,动画很奇怪

Current Behavior

radar-aniamtion-bug.mp4

Expected Behavior

雷达图的角度不要发生旋转

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@xile611 xile611 added the bug Something isn't working label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants