javascript - highcharts add series from array -


i trying add series javascript array, not work. code shows:

var values=[]; (var i=0;i<string.data.length;i++)           values[i]=string.data[i].value; 

that sets values [11,9,9,8,7,7,5,4,4,2]. highcharts

$(function () { $('#uniquescancount').highcharts({ ...     series: [{             name: 'unique scans: ',             data: values,         }]     }); }); 

the series not show data. can me out? thanks!

there must wrong values array, caused loop or string.data, here working example using var series.data , values arrary:

fiddle

var values= [11,9,9,8,7,7,5,4,4,2];      $('#container').highcharts({     series: [{         data: values     }] }); 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -