This is what I have currently in my legend options:
Code: Select all
labelFormatter: function() {
return this.name + (this.data.length ? ' (' + this.data[this.data.length - 1].y + ')' : '');
}
Code: Select all
labelFormatter: function() {
return this.name + (this.data.length ? ' (' + this.data[this.data.length - 1].y + ')' : '');
}
We want to see the numbers of the last added points in the legend.SOMR wrote:You want to see only the latest added? Or you want to see all the legend included the latest added or maybe to see all the legend and only the latest is selected/visible and old legend is hidden?
Code: Select all
chart.series[serieIndex].legendItem.attr("text", "your text here")
Code: Select all
chart.series[serieIndex].legendItem.element.textContent