score:1

Accepted answer

you will need to watch for changes to the selected chart type. i suggest something like:

var charttype = "line";
$("#charttype").change(function() {
    charttype = $("#charttype option:selected").val();
});

you can now refer to the variable charttype in your chart code.

 chart.addseries({
            name: '#active leaners',
            type: charttype,
            color: '#43cd80',  
            data:[100, 200, 300, 400, 100, 200, 100,200,300,100,400,100]

http://jsfiddle.net/byx9k/

to make your job simpler, i suggest putting the code which draws the chart into a function. you can then call this function whenever any of the selections/inputs changes. something like:

var charttype = "line";
var seriestype = "a";
$("#charttype").change(function() {
    charttype = $("#charttype option:selected").val();
    redrawchart();
});
$(".test").change(function() {
    seriestype = this.getattribute("value");
    redrawchart();
}

score:2

you can simply update series.types using series.update(). see: http://jsfiddle.net/zuxdg/

$("#charttype").change(function() {
    var type = this.value;
    if(type !== '0') {
        $(chart.series).each(function(){
            this.update({
                type: type 
            }, false);
        });
        chart.redraw();
    }
});

Related Query

More Query from same tag