Remove relabeling of legend when only 1 series exists

Fixes #5582
This commit is contained in:
Rashid Khan 2015-12-02 10:18:11 -07:00 committed by Lukas Olson
parent 045190d7dd
commit 5a293aad3d

View file

@ -43,17 +43,8 @@ define(function (require) {
};
Legend.prototype._getSeriesLabels = function (data) {
var isOneSeries = data.every(function (chart) {
return chart.series.length === 1;
});
var values = data.map(function (chart) {
var yLabel = isOneSeries ? chart.yAxisLabel : undefined;
return chart.series.map(function (series) {
if (yLabel) series.label = yLabel;
return series;
});
return chart.series;
})
.reduce(function (a, b) {
return a.concat(b);