Hi there,

You're not alone in the confusion - the documentation "reads" as if
Charts can only manipulate sets of data from 0 to X and from 0 to Y. I
suggest you read more of the messages in this Group to get a better
perspective of the things you can do with Google Charts.

There's two problems with your scenario:

1) The data cleansing and serialising is your responsability - Google
does not interefere with the data in any way. This means you have to
build the functionality to serialise the datetime component of your
item before shipping it off to Google.

2) Serialising datetimes may result in numbers that are not "chart-
able" without the use of some hacking: have a read of the encoding
section of the Google Charts documentation to understand this issue.

I would solve the problem pre-processing the data in PHP / Javascript
to convert the datetimes to something usable by Google Charts, and
then call the Chart.

There's a few functions in PHP that serialise the current time (or any
other datetime) - the PHP.NET repository would be the first place to
explore

regards,

Carlos M
:: carloslabs ::

On Jul 6, 3:05 pm, TAguy <[email protected]> wrote:
> Hi everyone,
> Can the following data set be displayed on Google Scatter plot?  The
> data is date and time on the x axis and price on the y.  There can be
> multiple prices for the same time.  Unlike a normal time series which
> has only one price per time this has multiple price values for each
> time.  It could have tens perhaps even hundreds of price points per
> time.  The prices will be within a normal (tight) range for the data
> set, say $900 - $905 or $20-$21 etc.  The date/time is retreived as
> 2009-Jul-6 10:00 and sent to google that way.
>
> It seems to me that Google Scatter expects data to be sent to it from
> 0 to x and 0 to y.  Is that correct?  If so, can google convert the
> date/time to a serial?
>
> The use case is a bunch of people will enter date/time and prices.  A
> day will be shown on the x and all the entered prices will be
> displayed as points for each time segment per day, say every 5 minute
> segment.
>
> I'm using drupal.org, and the drupal charts project (http://drupal.org/
> project/charts).
>
> Here's the data in the db ...
> 2009-07-06 11:15  $102.00
> 2009-07-06 09:30  $90.00
> 2009-07-06 10:15  $101.00
>
> Here's what the Charts Module send to Google 
> ...http://chart.apis.google.com/chart?cht=s&chs=600x300&chd=s:999&chco=f...Mon,%202009-07-06%2010:15|Mon,%202009-07-06%2011:15&chm=tMon,%202009-07-06%2009:30,ff0000,0,0,10|tMon,%202009-07-06%2010:15,ff0000,0,1,10|tMon,%202009-07-06%2011:15,ff0000,0,2,10
>
> The data points don't display.
>
> Not quite what I want.  Any ideas?
>
> Regards.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to