question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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,
          },
        ],
      },
    },
  ],
};

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
j-zielinskicommented, Feb 1, 2022

@Ovilia I just wanted to let you know that this bug still occurs in 5.3.0.

0reactions
j-zielinskicommented, Sep 26, 2022

@Ovilia This problem seems to have been solved here: https://github.com/apache/echarts/pull/17412. So in 5.4.0 it can be considered as fixed. Thanks! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bugs in Pie chart label placement - Highcharts
Hi, When using pie charts I noticed some problems. Some data combinations lead to very buggy label placements (no connector lines, labels on...
Read more >
Java9 bug in javafx PieChart labels - Stack Overflow
For some reason the state of the first container which holds the pie charts does not always update ( in my case, sometimes...
Read more >
Tableau Mini Tutorial: Labels inside Pie chart - YouTube
TableauMiniTutorial Here is my blog regarding the same subject. The method in the blog is slightly different.
Read more >
Pie chart options | Looker - Google Cloud
Labels : Displays lines marking the individual sections of the pie chart. You can customize the information that displays next to these lines....
Read more >
Dealing with PieChart labels that don't fit
We've all been there: creating a Pie chart with labels a tad too long to fit. ... Set label's wrap (if we want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found