Skip to content

Commit

Permalink
Fixed bug where point.update and series.setData on stacked series did…
Browse files Browse the repository at this point in the history
…n't update the other series. Closes #1.
  • Loading branch information
highslide-software committed Jun 16, 2010
1 parent 638194e commit 61887b6
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion js/highcharts.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,29 @@ function Chart (options) {
* Redraw legend, axes or series based on updated data
*/
function redraw() {
var redrawLegend = chart.isDirty;
var redrawLegend = chart.isDirty,
hasStackedSeries,
seriesLength = series.length,
i = seriesLength,
serie;

// link stacked series
while (i--) {
serie = series[i];
if (serie.isDirty && serie.options.stacking) {
hasStackedSeries = true;
break;
}
}
if (hasStackedSeries) { // mark others as dirty
i = seriesLength;
while (i--) {
serie = series[i];
if (serie.options.stacking) {
serie.isDirty = true;
}
}
}

// handle updated data in the series
each (series, function(serie) {
Expand Down

0 comments on commit 61887b6

Please sign in to comment.