Gráficos de Google: las etiquetas de los gráficos de barras están invertidas

I create dinamically a chart for a website. I have a key/value map, I sort the values descending, and then create the url:

http://chart.googleapis.com/chart?
  chs=400x200&cht=bhs&chbh=a&chdlp=l&chg=25,0&chma=0,0,0,5&chtt=Chart+test&
  chxr=0,0,8,1&chds=0,8&chxt=t,y&
  chd=t:8,5,3&
  chxl=1:|Label_8|Label_5|Label_3

Gráfico

The values are set by chd=t:8,5,3, and the labels are set by chxl=1:|Label_8|Label_5|Label_3. However, in the chart image the labels are reversed.

I searched the documentation, but I didn't get why it is like this. Is it because I didn't set a value correctly, or is this the desired functionality?

I could reverse the label texts in chxl from code to be displayed how I want. Is this the right way?

preguntado el 08 de enero de 11 a las 16:01

1 Respuestas

i haven't found any mention about it either, but just made a try with -1 and it works. So use it like:

chxl=-1:|Label_8|Label_5|Label_3

Respondido 09 Feb 11, 07:02

It seems that it works with -1. It is strange that in the docs it is not specified anything about setting negative values to chxl. +1 for you :) - Verdadero suave

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.