0

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;
casillas
  • 16,351
  • 19
  • 115
  • 215

1 Answers1

1

There is a visibleInLegend property on each series that you can set to true or false. You can also hide tooltips on specific series:

series: [{
    name: "FieldName",
    visibleInLegend: false,
    tooltip: {
       visible: false
    }
}]

Example

ezanker
  • 24,628
  • 1
  • 20
  • 35