0

I am trying to implement a chart into my website using image-charts, but no matter how I set the gridline spacing, the graph never works out the way I want it to be.

I read through their documentation, and it says that you can use chg=<x_axis_step_size>,<y_axis_step_size> to set the grid size. I want the grid size to be 1x50. So I tried chg=1,50 but it did not work.

This is my graph: https://image-charts.com/chart?cht=lxy&chs=999x480&chd=t:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60|660,570,520,615,492,510,523,495,500,510,562,570,572,531,544,551,568,567,584,570,560,545,537,543,521,517,522,512,519,516,511,519,529,528,533,525,519,531,529,524,524,524,522,518,520,530,518,524,517,512,515,505,507,509,514,505,506,503,502,504,504|0,5,10,15,20,25,30,35,40,45,50,60|0,492,528,612,648,324,492,636,456,492,444,528,396&chxl=0:|0|5|10|15|20|25|30|35|40|45|50|55|60&chco=ffbc8a,407bcb&chxt=x,y&chls=3|3&chdl=Overall|Last%205%20seconds&chdlp=t&chg=1,50

As you can see from the url, it ends with chg=1,50, but if you click on the link and look at the image, the grid space is 10x100. I also tried changing the values to values other than 1,50, but the grid space always stays at 10x100.

Coco Liliace
  • 311
  • 5
  • 14

1 Answers1

0

Disclaimer: I'm Image-Charts founder.

Image-Charts.com was created in 2016 to be as close as possible as the now soon to be shutdown Google Image Charts API.

Here is our documentation regarding grid lines.

As you will see per our documentation:

Google Image charts use these two parameters to calculate how many x or y grid lines to show on the chart, we decided not to implement this feature as it was hard to use and error prone.

Thus the first two chg parameters are only used to enable/disable grid lines on x and y axis.

FGRibreau
  • 7,021
  • 2
  • 39
  • 48