views:

196

answers:

1

Is there a way to set the length of a data series using Google Charts i.e. send in 40 values and stipulate that the range is 256 values and have it plot the 40 values and leave room for (256-40) more values in the chart?

To get the idea, think of a finance intraday chart, at 10 o clock it displays only the data that is gotten by that time, but the chart still shows all of the space that eventually WILL get filled (when the trading day is over, that is).

I'd say to get a live preview of the effect to be accomplished here, see finance.google.com and look at the chart before 4 o'clock this afternoon and you'll see that it is not completely filled, although the chart is always the same "size" in terms of datarange.

+1  A: 

Fill the rest of the values using the _ (or __ depending on your encoding) special value to indicate "no data".

See the documentation for simple encoding for additional information on this. Text encoding uses negative values to indicate missing data.

Greg Hewgill
Superb. Thanks. If only the chart API doc was easy to navigate so this could be found easily.
adergaard
The API documentation used to be one big page, which was easy to read through once to get an overview. I think I preferred the old layout!
Greg Hewgill