Hi Daniel,

Below is a sample of what I'm pulling when I view source.  I can see where 
I might be going wrong now though being that I have the date formatted as a 
string though.  I tried to switch it to date format, but it caused the 
chart to fail.  I'm trying to sort out that issue now too.  I'm guessing 
the charts are pretty picky about the format in which they receive their 
date values from mySQL.  I'm reading up on that now too and trying to use 
the information in this thread to sort it out: 
 http://stackoverflow.com/questions/24929767/mysql-datetime-in-google-chart 

Anywho...  I would appreciate any direction on this one.  If you have a 
better source, I sure don't mind reading up on how to sort this out. 
 Thanks.

var data = new 
google.visualization.DataTable({"cols":[{"label":"Date","type":"string"},{"label":"Daily
 
Usage","type":"number"}],"rows":[{"c":[{"v":"2012-01-01"},{"v":153}]},{"c":[{"v":"2012-01-02"},{"v":160}]},{"c":[{"v":"2012-01-03"},{"v":179}]},{"c":[{"v":"2012-01-04"},{"v":171}]},{"c":[{"v":"2012-01-05"},{"v":169}]},{"c":[{"v":"2012-01-06"},{"v":196}]},{"c":[{"v":"2012-01-07"},{"v":205}]},{"c":[{"v":"2012-01-08"},{"v":196}]},{"c":[{"v":"2012-01-09"},{"v":202}]},{"c":[{"v":"2012-01-10"},{"v":213}]},{"c":[{"v":"2012-01-11"},{"v":189}]},{"c":[{"v":"2012-01-12"},{"v":214}]},{"c":[{"v":"2012-01-13"},{"v":193}]},{"c":[{"v":"2012-01-14"},{"v":185}]},{"c":[{"v":"2012-01-15"},{"v":204}]},{"c":[{"v":"2012-01-16"},{"v":206}]},{"c":[{"v":"2012-01-17"},{"v":209}]},{"c":[{"v":"2012-01-18"},{"v":212}]},{"c":[{"v":"2012-01-19"},{"v":219}]},{"c":[{"v":"2012-01-20"},{"v":207}]},{"c":[{"v":"2012-01-21"},{"v":196}]},{"c":[{"v":"2012-01-22"},{"v":213}]},{"c":[{"v":"2012-01-23"},{"v":209}]},{"c":[{"v":"2012-01-24"},{"v":215}]},{"c":[{"v":"2012-01-25"},{"v":205}]},{"c":[{"v":"2012-01-26"},{"v":211}]},{"c":[{"v":"2012-01-27"},{"v":205}]},{"c":[{"v":"2012-01-28"},{"v":201}]},{"c":[{"v":"2012-01-29"},{"v":205}]},{"c":[{"v":"2012-01-30"},{"v":212}]},{"c":[{"v":"2012-01-31"},{"v":204}]},{"c":[{"v":"2012-02-01"},{"v":209}]},{"c":[{"v":"2012-02-02"},{"v":202}]},{"c":[{"v":"2012-02-03"},{"v":215}]},{"c":[{"v":"2012-02-04"},{"v":214}]},{"c":[{"v":"2012-02-05"},{"v":187}]},{"c":[{"v":"2012-02-06"},{"v":203}]},{"c":[{"v":"2012-02-07"},{"v":211}]},{"c":[{"v":"2012-02-08"},{"v":216}]},{"c":[{"v":"2012-02-09"},{"v":206}]},{"c":[{"v":"2012-02-10"},{"v":209}]},{"c":[{"v":"2012-02-11"},{"v":195}]},{"c":[{"v":"2012-02-12"},{"v":199}]},{"c":[{"v":"2012-02-13"},{"v":217}]},{"c":[{"v":"2012-02-14"},{"v":209}]},{"c":[{"v":"2012-02-15"},{"v":214}]},{"c":[{"v":"2012-02-16"},{"v":219}]},{"c":[{"v":"2012-02-17"},{"v":219}]},{"c":[{"v":"2012-02-18"},{"v":216}]},{"c":[{"v":"2012-02-19"},{"v":213}]},{"c":[{"v":"2012-02-20"},{"v":204}]},{"c":[{"v":"2012-02-21"},{"v":199}]},{"c":[{"v":"2012-02-22"},{"v":204}]},{"c":[{"v":"2012-02-23"},{"v":195}]},{"c":[{"v":"2012-02-24"},{"v":190}]},{"c":[{"v":"2012-02-25"},{"v":199}]},{"c":[{"v":"2012-02-26"},{"v":211}]},{"c":[{"v":"2012-02-27"},{"v":193}]},{"c":[{"v":"2012-02-28"},{"v":198}]},{"c":[{"v":"2012-02-29"},{"v":202}]},{"c":[{"v":"2012-03-01"},{"v":202}]},{"c":[{"v":"2012-03-02"},{"v":199}]},{"c":[{"v":"2012-03-03"},{"v":223}]},{"c":[{"v":"2012-03-04"},{"v":183}]},{"c":[{"v":"2012-03-05"},{"v":204}]},{"c":[{"v":"2012-03-06"},{"v":204}]},{"c":[{"v":"2012-03-07"},{"v":211}]},{"c":[{"v":"2012-03-08"},{"v":213}]},{"c":[{"v":"2012-03-09"},{"v":194}]},{"c":[{"v":"2012-03-10"},{"v":215}]},{"c":[{"v":"2012-03-11"},{"v":201}]},{"c":[{"v":"2012-03-12"},{"v":211}]},{"c":[{"v":"2012-03-13"},{"v":218}]},{"c":[{"v":"2012-03-14"},{"v":212}]},{"c":[{"v":"2012-03-15"},{"v":210}]},{"c":[{"v":"2012-03-16"},{"v":0}]}]});




On Thursday, June 25, 2015 at 9:56:10 AM UTC-4, Daniel LaLiberte wrote:
>
> Zub zeb,
>
> Does your DataTable have one column for each of your series?   Can you 
> give an example of what your data looks like, perhaps in the form of an 
> array of arrays that you could pass to arrayToDataTable?
>
>
> On Wed, Jun 24, 2015 at 5:42 PM, zub zeb <[email protected] 
> <javascript:>> wrote:
>
>> I'm pretty sure I'm supposed to be using the series function for this, 
>> but whenever I try, I get only the first color of the series to display.   
>> The way it's set up now is that it pulls hourly timestamped data from a 
>> mySQL database from one column and then displays the totals of another 
>> column for that 24 hour period. The user can then select the period they 
>> want to view data for in order to view a column chart that covers days, 
>> weeks, months, or even years of data at a time.  Chart looks great, but all 
>> the days are the same color, and I would like to be able to have the user 
>> identify which days are the weekends.
>>
>> Can anybody point me in the right direction for achieving this?  Like I 
>> said, I know I'm supposed to be using a series in order to achieve this, 
>> but haven't had much success.
>>
>> I figured something like this should be what I want but like I said, I 
>> only see the first color for ALL the columns:
>>
>> series: {
>>             0: { color: '#99FF66' },
>>             1: { color: '#99FF66' },
>>             2: { color: '#f1ca3a' },
>>             3: { color: '#6f9654' },
>>             4: { color: '#1c91c0' },
>>             5: { color: '#43459d' },
>>             6: { color: '#e7711b' },
>>  },
>>
>>
>>
>>  -- 
>> 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] 
>> <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> 
>  - 978-394-1058
> [email protected] <javascript:>   5CC, Cambridge MA
> [email protected] <javascript:> 9 Juniper Ridge Road, Acton 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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to