0

Being a 1-to-1 replacement, why does this code generate such a different bar chart? Going through the image-charts docs, this looks like it should work. I'm having problems getting the text to display next to the chart, as well as displaying the custom x-axis.

What it should look like

Original googleapis code

https://chart.googleapis.com/chart?cht=bhs&chs=250x70&chd=t:19&chco=39e600&chf=bg,s,f3f1e9&chxt=x,x&chm=N**%%20Low,000000,0,-1,18&chxl=1:|Low|Medium|High&chxp=0,0,25,42,100|1,13,34,71&chxs=0N**%,000000

Swapping out to image-charts

https://image-charts.com/chart?cht=bhs&chs=250x70&chd=t:19&chco=39e600&chf=bg,s,f3f1e9&chxt=x,x&chm=N**%%20Low,000000,0,-1,18&chxl=1:|Low|Medium|High&chxp=0,0,25,42,100|1,13,34,71&chxs=0N**%,000000

What's going on here? Tried breaking it down to the smallest possible pieces, but never had any success getting the x-axis or text within the chart to work.

Any ideas?

FGRibreau
  • 7,021
  • 2
  • 39
  • 48
apichel
  • 91
  • 1
  • 1
  • 5

1 Answers1

1

Multiple x-axis (chxt=x,x) and custom text marker (chm=N**%%20Low,000000,0,-1,18) are supported in Image Charts API.

Here is the same chart in Image-Charts:

Now some little improvements:

  • set an explicit axis range for the first x axis with chxr=0,0,100 (axis=0, from 0 to 100)
  • a bigger chart with chs=350x90
  • make it chart retina display compliant with Image Charts own API (icretina=1)

Disclaimer: I'm Image-Charts founder.

FGRibreau
  • 7,021
  • 2
  • 39
  • 48