score:0

Accepted answer

There is no method for doing this in the API. You could remove the series and add it again with another name, but that will make the animations run a second time and I think it will be colored with a new color as well.

score:-1

It is not required to Redraw chart again We can include it along with the series option in the Chart declaration as below:

        var chart = new Highcharts.Chart({
        chart: {
            renderTo: 'high_container'
        },title: {
            text: 'IO Signal  Data'
        },subtitle: {
            text: 'Source: GPS Modem'
        },

        yAxis: {
            title: {
                text: 'Value'
            }
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle'
        },


        xAxis: {
            type: 'datetime',
            labels: {
                enabled: true,
                formatter: function () { return ddd[this.value][0]; }, //<=== the value to plot chart

            }
        },
        series: [{
            data: ddd,
            name: SeriesName
        }]
    });

score:-1

You can use the following to change the series name:

$(chart.series[0].legendItem.element).children('tspan').text('newLabelName');

score:8

This seems to work :

chart.series[1].name="Renamed";
chart.redraw();

score:53

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!


Related Query

More Query from same tag