Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts: How to rename series

I'm using highcharts in my web application and I was wondering if there's any way to rename a series after the chart hast been created??

Thanks in advance!!

like image 645
Chris Avatar asked Sep 03 '11 18:09

Chris


2 Answers

actually, there's a way now. In highchars 3.0 series added a new api, called update:

chart.series[0].update({name:"name u want to change"}, false);
chart.redraw();

it will not only update the series name below the chart, but the name in tooltip as well.

Cheers!

like image 122
buaacss Avatar answered Oct 25 '22 15:10

buaacss


This seems to work :

chart.series[1].name="Renamed";
chart.redraw();
like image 41
Lukas Avatar answered Oct 25 '22 13:10

Lukas