Ok, I see where the misunderstanding was. I figured that your data was just
truncated, not missing data points. Personally, I would just write a
mergesort to combine the arrays. But if you turn each series into its own
DataTable, you could use google.visualization.data.join (
https://developers.google.com/chart/interactive/docs/reference#google_visualization_data_join)
to combine them.

On Mon Dec 01 2014 at 1:44:35 PM mrp <[email protected]> wrote:

>
>
> On Monday, December 1, 2014 7:58:14 AM UTC-8, Sergey wrote:
>>
>> Hi, could you give more detail about how your data is structured? It
>> doesn't seem like you should be iterating over any arrays to find the
>> longest series, since you should just be able to use the .length property
>> of arrays to find out its length. You say you have an array of arrays, so I
>> presume you have a structure like var data = [series1data, series2data,
>> series3data], so you should be able to do Math.max(data[0].length,
>> data[1].length, data[2].length).
>>
>>
>> Sergey,
>
> Yes, my data is arranged as an array of series, with each series having
> different length. Finding the max length is not the issue, but inserting
> nulls is. I still have to iterate through the array and insert nulls which
> seems tedious.
>
> Thanks,
> mrp
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to