Skip to content

[Bug] Pie Chart - setting "minShowLabelAngle" in "media" cause label line artifacts #16436

@j-zielinski

Description

@j-zielinski

Version

5.2.2, 5.3.0-rc.1

Link to Minimal Reproduction

https://codesandbox.io/s/recursing-torvalds-tjuxw?file=/src/index.js

Steps to Reproduce

  1. Open Codesandbox
  2. Resize window below and over 500px width
  3. You will notice some label lines are still rendered when they should not

Current Behavior

pie-chart-label

Expected Behavior

If label is not visible anymore, corresponding line should also disappear.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

Code:

export const options = {
  dataset: {
    dimensions: [
      {
        name: 'Job',
        id: 'job',
      },
      {
        name: 'Candidates',
        id: 'count',
      },
    ],
    source: [
      ['231030', 63],
      ['288230', 41],
      ['424080', 8],
      ['387581', 7],
      ['293479', 6],
      ['__empty__', 6],
      ['244185', 4],
      ['262793', 4],
      ['262635', 3],
      ['297479', 3],
      ['187996', 2],
      ['276594', 2],
      ['355507', 2],
      ['495143', 2],
      ['55342', 1],
      ['59508', 1],
      ['263196', 1],
      ['266390', 1],
      ['266392', 1],
      ['280606', 1],
      ['293256', 1],
      ['324698', 1],
      ['355509', 1],
      ['384268', 1],
      ['424166', 1],
      ['430854', 1],
      ['473469', 1],
      ['490810', 1],
    ],
  },
  series: [
    {
      type: 'pie',
    },
  ],
  media: [
    {
      query: {
        maxWidth: 500,
      },
      option: {
        series: [
          {
            minShowLabelAngle: 8,
          },
        ],
      },
    },
    {
      query: {
        minWidth: 500,
      },
      option: {
        series: [
          {
            minShowLabelAngle: 4,
          },
        ],
      },
    },
  ],
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions