score:2

Accepted answer

this is working fine for me:

var chart;
$(document).ready(function() {
    options ={ 
        chart: {
         renderto: 'container',
         defaultseriestype: 'line',
         zoomtype: 'xy'
      },
               title : { text : 'foo' },
                xaxis: { title: { text: 'x label'  } },
    yaxis: { title: { text: 'y label' } },

        series: {}
              };

   chart = new highcharts.chart(options);
   series3 = [{"name": 10402, "color": "rgba(255,139,0,0.5)", data: [[ 146,55.8 ],[150,60.9]]},{"name": 10403, "color": "rgba(255,255,0,0.5)", "data": [[ 130,25.8 ],[150,54.9]]}];
   series2 = [{
         name: '1042',
         color: "rgba(255,139,0,0.5)",
         data: [[ 146,55.8 ],[150,60.9]]
      }, {
         name: '10403',
          color: "rgba(255,255,0,0.5)",
         data: [[ 130,25.8 ],[150,54.9]]
      }];
    $( "#chartform" ).submit(function() {
    options.series = series3;
    var chart = new highcharts.chart(options);
return false;
    });


});

edit: i believe the problem is that you are submitting the form. do a return false and use submit handler instead of click. you can check it live in: http://jsfiddle.net/bcfhl/157/


Related Query

More Query from same tag