Hmm...That could be a problem.
I'm creating the json from a php object using json_encode() and
http://www.json.org/ website mentions the use of double quotes, not
single, but I figured I'd try it anyway. I did a string replace of all
double quotes with single quotes, which works (the data has single
quotes, not doubles), but then the chart doesn't show up at all.

Mike

On Feb 9, 10:01 am, Fons Seesink <[email protected]> wrote:
> I did not want to advise you to use "single", but the single qoutes as
> in ' rather than " to wrap your code in
> like i placed in your ( shortened) code
> {'cols':[{'id':.......'type':'number'}],
>
>
>
>
>
>
>
>
>
> On Thu, Feb 9, 2012 at 3:54 PM, Mike Beccaria <[email protected]> wrote:
> > Thanks for your help! Unfortunately it didn't work. If I understood
> > you correctly, you wanted me to use "single" as the "type" for the
> > checkouts column. I couldn't find any mention of a "single" type but
> > put it in there anyway and now the table won't sort. The data is live
> > with "single" now as the type.
>
> > On this page:
> >http://code.google.com/apis/chart/interactive/docs/reference.html#Dat...
>
> > It lists a getColumnType function that does not mention a "single"
> > type:
> > Returns the type of a given column specified by the column index.
> >    columnIndex should be a number greater than or equal to zero, and
> > less than the number of columns as returned by the
> > getNumberOfColumns() method.
> > The returned column type can be one of the following: 'string'
> > 'number' 'boolean' 'date' 'datetime' 'timeofday'
>
> > I'm not gonna lie, I'm a bit stumped at the moment and hope I'm
> > overlooking something simple.
> > Thanks again,
> > Mike
>
> > On Feb 9, 8:53 am, Fons Seesink <[email protected]> wrote:
> >> indeed, have been looking with my eyes closed it seems
> >> in your code try and define with single ' rather than using "
> >> {'cols':[{'id':.......'type':'number'}],
>
> >> not sure but the websites explaining about the topic all use single
>
> >> On Thu, Feb 9, 2012 at 1:48 PM, Mike Beccaria <[email protected]> 
> >> wrote:
> >> > Not with my browser. I checked it this morning (just now) and noted
> >> > that the numbers don't sort in order. Here's a screenshot:
> >> >http://screencast.com/t/O5Otv4fv
>
> >> > Notice the checkouts are supposed to be sorted from high to low but
> >> > they go from 9,8,...36,18,16.
>
> >> > Mike
>
> >> > On Feb 9, 7:05 am, Fons Seesink <[email protected]> wrote:
> >> >> Looking at your website, I think you sorted things out
>
> >> >> On Wed, Feb 8, 2012 at 10:25 PM, Mike Beccaria <[email protected]> 
> >> >> wrote:
> >> >> > I created my 1st visualization that creates a sortable table of
> >> >> > values. The problem is that when I sort the "Checkouts" column, they
> >> >> > sort like letters and not like numbers even though I specified the
> >> >> > column data type as a number.
>
> >> >> > Here's the table:
> >> >> >http://library.paulsmiths.edu/test/charts/top5visualization.html
>
> >> >> > And the json data that it queries:
> >> >> >http://library.paulsmiths.edu/test/charts/top5.php
>
> >> >> > Notice that that Checkouts column is a number but when you sort the
> >> >> > column, it doesn't sort properly:
> >> >> > {"cols":[{"id":"year","label":"Year","type":"number"},
> >> >> > {"id":"title","label":"Title","type":"string"},
> >> >> > {"id":"checkouts","label":"Checkouts","type":"number"}],
>
> >> >> > Sorted Copy from chart:
> >> >> > 2011        Dog hikes in the Adirondacks : 20 trails to enjoy       9
> >> >> > 2010        Water for elephants : a novel by Sara Gruen.    9
> >> >> > 2010        The Eighth International Symposium on Environmenta      9
> >> >> > 2010        Streams : their ecology and life by Colbert.E. Cu       8
> >> >> > 2010        Introduction to permaculture by Bill Mollison wit       8
> >> >> > 2010        Negotiation by Roy J. Lewicki, Bruce Barry, David       8
> >> >> > 2010        Amuse-bouche : little bites that delight before th      8
> >> >> > 2010        Billy Joe Tatum's Wild foods cookbook and field gu      8
> >> >> > 2008        About wine by J. Patrick Henderson, Dellie Rex. 36
> >> >> > 2011        The help by Kathryn Stockett.   18
> >> >> > 2009        Twilight by Stephenie Meyer.    16
> >> >> > 2011        Research design : qualitative, quantitative, and m      14
> >> >> > 2009        Lies my teacher told me : everything your American      14
> >> >> > 2009        Marked : a house of night novel |c P.C. Cast and        14
> >> >> > 2008        Plows, plagues, and petroleum : how humans took co      14
> >> >> > 2010        How the other half lives; studies among the teneme      13
>
> >> >> > Any idea how to fix this? Am I overlooking something?
> >> >> > Thanks,
> >> >> > Mike
>
> >> >> > --
> >> >> > 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 
> >> >> > athttp://groups.google.com/group/google-chart-api?hl=en.
>
> >> >> --
>
> >> >> Best regards
> >> >> Fons Seesink
>
> >> > --
> >> > 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 
> >> > athttp://groups.google.com/group/google-chart-api?hl=en.
>
> >> --
>
> >> Best regards
> >> Fons Seesink
>
> > --
> > 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 
> > athttp://groups.google.com/group/google-chart-api?hl=en.
>
> --
>
> Best regards
> Fons Seesink

-- 
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