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

Pie charts data label positioning doesn't ignore hidden slices #2510

Closed
dejongch opened this issue Dec 5, 2013 · 1 comment
Closed

Pie charts data label positioning doesn't ignore hidden slices #2510

dejongch opened this issue Dec 5, 2013 · 1 comment

Comments

@dejongch
Copy link

dejongch commented Dec 5, 2013

If you have a Pie chart with hidden slices, the positioning of the data labels is very messy because it is positioning them around the hidden slices data labels.

http://jsfiddle.net/z9NN9/

I found that this issue is caused here:

// arrange points for detection collision
each(data, function (point) {
    if (point.dataLabel) { // it may have been cancelled in the base method (#407)
        halves[point.half].push(point);
    }
});

if this is replaces with:

// arrange points for detection collision
each(data, function (point) {
    if (point.dataLabel && point.visible) { // it may have been cancelled in the base method (#407)
        halves[point.half].push(point);
    }
});

the issue no longer occurs.

@TorsteinHonsi
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants