--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/KgWY3LHY82wJ.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
var data = new google.visualization.DataTable();
data.addColumn('string', 'N');
data.addColumn('number', 'Value');
data.addRow(['V', 200]);
It would be great if we could instead do:
var data = new google.visualization.DataTable();
data.addColumn('string', 'N').addColumn('number', 'Value').addRow(['V', 200]);
Hi Sergey, I think for most people the recommended usage as shown in the docs is the best approach. However for my particular use case I have many charts built server-side using a single unobtrusive javascript interface that's receiving JSON to programatically define how charts need to be constructed. This seemed like a much more favorable solution than to have to write a new javascript file for each of my many charts. The drawback was that my single JS file had to get a little messy to handle various charts and options which got pretty messy and tricky to read. That said I'm looking for opportunities to make things a little more succinct and this was one of the biggest redundancies that I had noticed in my code so I thought I'd bring it up.
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/lupg-z4krxMJ.