Skip to content

Commit

Permalink
Fixed data labels for pie points not getting hidden when hiding point.
Browse files Browse the repository at this point in the history
…Closes highcharts#72.
  • Loading branch information
highslide-software committed Aug 25, 2010
1 parent 991e030 commit 47bb2eb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions js/highcharts.src.js
Expand Up @@ -7355,7 +7355,10 @@ Series.prototype = {
options.rotation,
align
)
.attr({ zIndex: 1 })
.attr({
zIndex: 1,
visibility: point.visible === false ? HIDDEN : VISIBLE // for pies
})
.add(dataLabelsGroup); // pies have point.group
}

Expand Down Expand Up @@ -8416,25 +8419,22 @@ var PiePoint = extendClass(Point, {
setVisible: function(vis) {

var point = this,
chart = point.series.chart;
chart = point.series.chart,
method;

// if called without an argument, toggle visibility
point.visible = vis = vis === UNDEFINED ? !point.visible : vis;

method = vis ? 'show' : 'hide';

if (vis) {
//layer.show();
point.group.show();
point.tracker.show();


} else {
//layer.hide();
point.group.hide();
point.tracker.hide();

point.group[method]();
if (point.tracker) {
point.tracker[method]();
}

if (point.dataLabel) {
point.dataLabel[method]();
}

if (point.legendItem) {
chart.legend.colorizeItem(point, vis);
}
Expand Down

0 comments on commit 47bb2eb

Please sign in to comment.