jquery plugins - I get this error "Cannot read property 'type' of undefined" when I use highchart -


i using timeseries chart highchart plugin follow:

var series1={                             type: 'area',                             color:linecolors[numoflines],                             name: legends[numoflines],                             pointinterval: 24 * 3600 * 1000,                             pointstart:date.utc(datestart[0], datestart[1], datestart[2]) ,                             data: democrat};                     var series2={                             type: 'area',                             color:linecolors[numoflines+1],                             name: legends[numoflines+1],                             pointinterval: 24 * 3600 * 1000,                             pointstart:date.utc(datestart[0], datestart[1], datestart[2]) ,                             data: repub};                     youdynamicseries.push(series1);                     youdynamicseries.push(series2);} 

and after creating series create chart this:

highcharttimeseries(youdynamicseries,xlabel,'trend_chart'); 

and highcharttimeseries function follow:

function highcharttimeseries(series,date,chartcontainer) 

{

 $('#'+chartcontainer).highcharts({             chart: {                 zoomtype: 'xy'             },             title: {                 text: ''             },             subtitle: {                 text: ''             },             xaxis: {                 type: 'datetime',                 minrange: 7 * 24 * 3600000 // fourteen days             },             yaxis: {                 title: {                     text: ''                 }             },             legend: {                 layout: 'horizontal',                 align: 'middle',                 verticalalign: 'top',                 borderwidth: 0             },             plotoptions: {                 area: {  fillcolor: {                         lineargradient: { x1:0, y1: 5, x2: 0, y2: 0},                         stops: [                             [0, highcharts.getoptions().colors[0]],                             [1, highcharts.color(highcharts.getoptions().colors[0]).setopacity(0).get('rgba(f,f,f,f)')]                         ]                                        },                     marker: {                         radius: 2                     },                     linewidth: 2,                     states: {                         hover: {                             linewidth: 3                         }                     },                     threshold: null                 }             },              series:series        });     } 

now when run following error:

enter image description here

can wrong code?(i appreciate in advance)


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -