No payload returned

I'm trying to create a histogram like structure using the function below but can't get ti return any payload. Any ideas?

var Hy64={};
var arr[];
for (j=1;j<129; j+=2) {
     Hy64.labels[j]=j; Hy64.labels[j+1]=j;
Hy64.series = ['SINGLE'];
return {payload:Hy64};

var arr[]is a syntax error var arr = []

in your loop you are trying to add elements to data and labels, but neither have been defined.
var Hy64={labels:[],data:[]};

The loop starts at 1 and will produce element 0 as undefined.

Thank you so much. That solved my issue. :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.