Show range of last cells in visualization?

5 views
Skip to first unread message

Marcelo

unread,
Sep 22, 2011, 2:36:05 PM9/22/11
to Google Visualization API
Hello.

I have a spreadsheet that's updated daily.

What should I do if I want to show, in a viz, only the last 10 cells,
for example, but keeping the history?

I can define the range from a certain cell to the end of the column
( A70:A ), but how should I define a fixed relative size for the
beginning of the range?

Best,

Marcelo.

asgallant

unread,
Sep 22, 2011, 3:06:38 PM9/22/11
to google-visua...@googlegroups.com
You can do this on the visualization end, using a DataView:

/*  assumes:
 *    data is a populated DataTable object
 *    chart is the chart object to draw
 *    options is an object of chart options
 */
var view new google.visualization.DataView(data);
var rows [];
for (data.getNumberOfRows 11data.getNumberOfRowsi++{
    rows.push(i);
}
view.setRows(rows);
chart.draw(viewoptions);

Marcelo Soares

unread,
Sep 22, 2011, 4:39:41 PM9/22/11
to google-visua...@googlegroups.com
Thank you a real lot. We'll try here to see what happens.

> --
> 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/-/Z1hjEkSDN2AJ.
> 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.
>

Reply all
Reply to author
Forward
0 new messages