Why doesn't this work?

0 views
Skip to first unread message

charlie

unread,
Sep 29, 2008, 6:00:50 PM9/29/08
to Google Chart API
http://chart.apis.google.com/chart?cht=bhs&chtt=Highest+Average+Rating&chts=000000,20&chs=630x200&chco=4d89f9&chxt=x&chxr=0,0,10&chds=1,10&chm=tschool+0,FF00000,0,0,13,1|tschool+1,FF00000,0,1,13,0|tschool+2,FF00000,0,2,13,-1|tschool+3,FF00000,0,3,13,0|tschool+4,FF00000,0,4,13,0|&chd=t:8.1,7.63752,7.48765,7.43323,7.41244
I am trying to create a graph of 5 schools and their rating. The
scale is 1 to 10 and I want to put the school name on the bar
representing the school. I am trying to use text shape markers to put
the school name. All works well except the labeling. Any
suggestions?

keithb

unread,
Sep 29, 2008, 6:38:37 PM9/29/08
to Google Chart API
In your CHM parameter, you have an extra pipe symbol (|) at the end
and your value for the color red is wrong (one too many zeroes).

Have fun,
K

On Sep 29, 6:00 pm, charlie <char...@avvo.com> wrote:
> http://chart.apis.google.com/chart?cht=bhs&chtt=Highest+Average+Ratin...tschool+1,FF00000,0,1,13,0|tschool+2,FF00000,0,2,13,-1|tschool+3,FF00000,0,3,13,0|tschool+4,FF00000,0,4,13,0|&chd=t:8.1,7.63752,7.48765,7.43323,7.41244

charlie

unread,
Sep 29, 2008, 7:37:12 PM9/29/08
to Google Chart API
Thanks, that worked great, or at least as advertised. Unfortunately
it doesn't do what I really want. What I wanted to do as label the
bars of the chart. Using the CHM parameter will right justify the
names. What I would like to have is left justified labels on each
bar. Is this possible?

keithb

unread,
Sep 29, 2008, 7:52:18 PM9/29/08
to Google Chart API
No, not without being creative...

A quick hack:
http://chart.apis.google.com/chart?cht=bhs&chs=300x60&chds=1,10&chm=tSchool+0,FF0000,0,0,13|tSchool+1,FF0000,0,1,13&chd=t:2.0,2.0|6.0,4.0

You'll see that I added an extra dataset and applied the text markers
to the first dataset. You'll have to tweak the relative sizes (keeping
the total equal to your original values) in order to get the text
positioned more to your liking. Again, it's a work-around, but it
might a better option if you don't want to use Y-Axis labels (as shown
in the bar charts here: http://code.google.com/apis/chart/#line_bar_pie_colors
).

- K
Reply all
Reply to author
Forward
0 new messages