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).

To answer your question more directly, you will have to use nulls for
missing data. There isn't really any way around this.

On Wed Nov 26 2014 at 3:11:14 PM mrp <[email protected]> wrote:

> What is the best way to create a multi-series Line Chart with each series
> having a different length? I searched and didnt find a solution I could
> use. Basically I have an array of arrays (series) each with different
> lengths. Inserting nulls of blanks is inefficient since I have to iterate
> through the array to find the longest series and then insert nulls in all
> the other smaller series.
>
> I am surprised the API doesnt allow for this feature (multiple series with
> varying lengths) like CanvasJS.
>
> 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 google-visualization-api@
> googlegroups.com.
> 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