Jquery plugins 我得到这个错误;无法读取属性';类型';“未定义”的定义;当我使用海图时
我使用highchart插件中的timeseries图表,如下所示:Jquery plugins 我得到这个错误;无法读取属性';类型';“未定义”的定义;当我使用海图时,jquery-plugins,highcharts,Jquery Plugins,Highcharts,我使用highchart插件中的timeseries图表,如下所示: var series1={ type: 'area', color:lineColors[numOfLines], name: legends[numOfLines], pointInterval: 24
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);}
function highcharttimeseries(series,date,chartcontainer)
在创建系列之后,我创建了如下图表:
highcharttimeseries(youDynamicSeries,xLabel,'trend_chart');
highcharttimeseries的功能如下:
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);}
function highcharttimeseries(series,date,chartcontainer)
{
现在,当我运行它时,我得到以下错误:
有人能帮我找出代码的错误吗?(我提前感谢任何帮助)你能把你的示例回复为现场演示(在jsFiddle.net上)吗?感谢@SebastianBochan的回答,我刚刚发现了一个问题,我必须将要传递给series的数组转换为float。这是有意义的,所以现在工作得很好?是的,还有另一个错误,在if-else语句中的代码中,我错误地传递了一个不存在的级数,因此修复了所有这些数组之后,它就工作了。顺便说一下,5tha感谢nks跟进此帖子,并感谢您为解决此问题付出的努力