With date axes, the values are always going to be in date order.  Since 
your display doesn't require any real date for the data in the chart 
itself, you can perform a transform of the data to get the day of the week 
and then assign each data point to a date with a know date of the week, 
such that the new dates are arranged properly.  It doesn't particularly 
matter what you pick as the base for the new dates, as long as dates that 
fall on a Sunday are always translated to the same calendar day (which 
falls on a Sunday) and that dates that fall on a Monday are translated into 
the day after the translated Sunday (eg, March 18, 2013 -> May 26, 2013 and 
March 13, 2013 -> May 29 2013 would put the first on a Sunday and the 
second on a Wednesday, and the chart would be ordered Sun, Mon, Tues...). 
 I modified the example code to accomplish this: 
http://jsfiddle.net/asgallant/rWrXR/1/

On Wednesday, May 29, 2013 6:21:59 PM UTC-4, [email protected] wrote:
>
> Sorry - a couple more corrections. In the example you sent, the hour/vAxis 
> is working beautifully. The hAxis however seems to be grouping entries for 
> each date that is in the data, as opposed to each day of week (no 
> repetition). Not sure how to get around that when using the date data type.
>
> On Wednesday, May 29, 2013 6:07:55 PM UTC-4, [email protected] wrote:
>>
>> Many thanks for this - the reference did not mention that there was 
>> support for datetime or timeofday, just number, so that's what I was 
>> working with.
>>
>> Any thoughts on how to maintain a proper "day of week" and "hour of day" 
>> order?
>>
>> For what it's worth, I tried another method that involved the following:
>>
>> - Formatting the columns as "dow(##)" or "hod(##)"
>> - Using the "ready" event to go back and hit the chart with jQuery, find 
>> the text entities (#chart_div svg text) and do a regex replacement on these 
>> values
>>
>> Crude, but it worked. 
>>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to