I have the following implementation. There multiple objects (data and legend) pushed into chart to be drawn. Imagine that there are few objects' legend information are same and when I run the code there are multiple same legend information shown on the chart.
How could I handle these duplicate legend information?
for (i = 0; i < dataSeriesBit.length; i++) {
for (j = 0; j < self.colorMap.length; j++) {
var d = dataSeries[i].data.filter(function (x) { return x.color == self.colorMap[j] });
an.push({ data: d, name:"Size:"+d[0].n.toString()});
}
}
chart.options.series = an;