How do I get Google charts to scale an extended encoding graph?

Over the course of my life, I cannot correctly display this graph with extended encoding.

If I change the axis range from 0 to 15, it looks correct, but if I change the axis from 9 to 15, the data is not displayed correctly.

This is obtained correctly:

<img src="http://chart.apis.google.com/chart?cht=lc&amp;chco=125292&amp;chm=B,cee1f5,0,0,0&amp;chls=2&amp;chs=408x237&amp;chxt=x,y&amp;chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul&amp;chxr=1,0,15&amp;chd='+extendedEncode(Array(10,15,9,11,12,10,11),15)+'" />

chart? cht = lc & chco = 125292 & chm = B, cee1f5,0,0,0,0 & chls = 2 & chs = 408x237 & chxt = x, y & chxl = 0: | Jan | Feb | Mar | Apr | May | Jun | Jul & chxr = 1,0,15 & chd = e : qq..mZu7zMqqu7

But this is not true:

<img src="http://chart.apis.google.com/chart?cht=lc&amp;chco=125292&amp;chm=B,cee1f5,0,0,0&amp;chls=2&amp;chs=408x237&amp;chxt=x,y&amp;chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul&amp;chxr=1,9,15&amp;chd='+extendedEncode(Array(10,15,9,11,12,10,11),15)+'" />    

chart? cht = lc & chco = 125292 & chm = B, cee1f5,0,0,0,0 & chls = 2 & chs = 408x237 & chxt = x, y & chxl = 0: | Jan | Feb | Mar | Apr | May | Jun | Jul & chxr = 1,9,15 & chd = e : qq..mZu7zMqqu7

I spent hours and hours trying to figure it out, and I feel like I'm missing something incredibly simple. I have to use extended encoding because of the range of numbers that my program will ultimately process, so switching to "Text format with custom scaling" is not an option.

+3
source share

Source: https://habr.com/ru/post/1787260/


All Articles