score:-2

Not sure you find an answer yet or not but I found one link which is 101% useful to you even for future reference. So can you have a look please. I was searching for something else and I found this link and also got your question.

   [http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/members/series-update/][1]

Let me know or accept my answer if this will help to you in any manner. Cheers:)

score:0

Here what works for me:

function changeType() {
  var series  = chart.series[0];
  var newType = your_condition_here ? 'column' : 'bar';
  var dataArray = [],
      points = series.data;

  series.chart.addSeries({
      type: newType,
      name: series.name,
      color: series.color,
      data: series.options.data
  }, false);
  series.remove();
}

It creates new series using the new type and removes the old one.

Free to add more options as you need.

Hope it helps someone :)

score:0

You are able to update the chart type at the level of the chart. Since you have set the type inside the chart attribute, you need to update the same attribute.

// Initializing Chart
let probChart = new Highcharts.Chart('container', {
  chart: { 
    type: "line"
  },
});

// Updating Chart Type
probChart.update({
  chart: { type: "column" }
});

score:3

This works for me:

$.each(chart.series, function (key, series) {
    series.update(
        {type: 'bar'},
        false
    );
}

score:12

You can use inverted parameter in chart and update yAxis. http://jsfiddle.net/n9xkR/8/

$('#bar').click(function () {


    chart.inverted = true;
    chart.xAxis[0].update({}, false);
    chart.yAxis[0].update({}, false);
    chart.series[0].update({
        type: 'column'
    });

});

Related Query

More Query from same tag