javascript - loading data that the size isnt determined in highchart -


ok, started learning javascript, , highchart, , need can nudge me right direction.

so, displaying data on pie chart in highchart api.

and datas in csv form.

once datas array in javascript, not know have next.

since size of data not determined, dont know how should code data input part.

the data input part

series: [{                             type: 'pie',                             name: 'occurence',                             point: {                                 events:                                 {                                     click: function(event)                                     {                                         location.href = this.options.url;                                         event.preventdefault();                                     }                                 }                             },                             data: [                                 ['robbery',1900],                                 ['assult',4693],                                 ['non_criminal',6516],                                 {                                      name:'larceny/theft',                                     y: 14827,                                     sliced : true,                                     selected : true                                  }                             ]                         }] 

something llike this.

i can not find way of putting datas when size of data not defined.

so above example, size of data 4.

is there way of approaching issue?

would appreciate input genius stackoverflow members!


Comments