We've thought of doing something like that, but haven't gotten around to implementing it. It is becoming a frequent request, however, so I will try to look into how we might implement it.
On Mon, Jun 26, 2017 at 12:01 AM, Sam56 <[email protected]> wrote: > I am trying to create a stacked bar chart using Google Charts. The data I > have is kind of jumpy, for example: Let's say I have a data set like this: > > - 2001, A, 500 > - 2001, B, 200 > - 2001, C, 100 > - 2002, B, 900 > - 2002, C, 400 > - 2003, A, 600 > - 2003, C, 900 > > The columns are the year and the letter. In Google Charts, you would > create this chart like this: > > var data = new google.visualization.DataTable(); > data.addColumn('string', 'Topping'); > data.addColumn('number', 'A'); > data.addColumn('number', 'B'); > data.addColumn('number', 'C'); > > > data.addRows([ > > ['2001', 500, 200, 100], > ['2002', undefined, 900, 400], > ['2003', 600, undefined, 900], > ]); > > > > > However, because the data is jumpy and it's not possible to know what > comes next, creating a chart like this becomes a headache. Is it possible > to create one row at a time like so: > data.addRow['2001', 'A', 500]; data.addRow['2001', 'B', 200], etc? So for > example, undefined columns that don't exist won't show up like 2002: A. Is > it possible to do something like this? > > -- > 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 https://groups.google.com/ > group/google-visualization-api. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/google-visualization-api/2111b4a1-79de-42aa-afdd- > 0a272d8f3ab8%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/2111b4a1-79de-42aa-afdd-0a272d8f3ab8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- 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 https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJPAnYJJisSB52eFjvoEwQ%3DDsSOd4PhAAx0kZve_vr4b7Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
