Help with generated hyperlink

30 views
Skip to first unread message

Howard Hoyt

unread,
Jul 5, 2011, 11:56:29 AM7/5/11
to google-c...@googlegroups.com
I am having a problem that I cannot get a handle on.

I have a small C program that generates a hyperlink to google charts.

I can copy/paste the generated code into browser url and all is ok.
Testing locally (as in gmail to self) all works ok on hyperlink.

When others mail me the results, clicking on the hyperlink produces a bad graph.
This is a good graph (from copy/paste) And it is the way my generated
code reads...
http://chart.apis.google.com/chart?chf=bg,lg,0,EFEFEF,0,BBBBBB,1|c,lg,0,EFEFEF,0,BBBBBB,1&chxl=0:|1|2|3|4|5|6|1:|0|10|20|2:|Qso/5min&chxp=2,10&chxr=0,0,6|1,-5,20|2,0,20&chxs=0,FF0000,10.5,0.5,l,0000FF|1,0000FF,11.5,0,l,676767|2,0000FF,13.5,0,l,676767&chxt=x,y,r&chs=500x210&cht=bvg&chco=76A4FB&chds=0,20&chd=t:10,8,3,7,7,6&chdlp=l&chg=20,50&chma=20,20&chtt=N4DW-2011-06-10+Segment+Analysis&chts=000000,13.5

this is a problem (from click on hyperlink in recvd email)
http://chart.apis.google.com/chart?chf=bg,lg,0,EFEFEF,0,BBBBBB,1|c%2Clg%2C0%2CEFEFEF%2C0%2CBBBBBB%2C1%26chxl%3D0%3A|1|2|3|4|5|6|1%3A|0|10|20|2%3A|Qso/5min&chxp=2,10&chxr=0,0,6|1%2C-5%2C20|2%2C0%2C20%26chxs%3D0%2CFF0000%2C10.5%2C0.5%2Cl%2C0000FF|1%2C0000FF%2C11.5%2C0%2Cl%2C676767|2%2C0000FF,13.5,0,l,676767&chxt=x,y,r&chs=500x210&cht=bvg&chco=76A4FB&chds=0,20&chd=t:10,8,3,7,7,6&chdlp=l&chg=20,50&chma=20,20&chtt=N4DW-2011-06-10+Segment+Analysis&chts=000000,13.5

Apart from loss of color, the Y axis goes to 100 scale (possibly a
default), but it should be 20.
I can see the data change between the two but am too stupid to figure
what is happening.

What am I doing wrong ??

Thanks !

Howie

duniyadnd

unread,
Jul 7, 2011, 5:12:37 PM7/7/11
to google-c...@googlegroups.com
It looks like your mail client is urlencoding the link. It could be doing this as a safety mechanism. Does your mail client do this or all emails? Did you try sending yourself a URL for something else that was not related to Google charts, and if you get a similar issue, then the issue is not with Google Charts, but with your mailing system.

Howie

unread,
Jul 12, 2011, 3:58:16 PM7/12/11
to Google Chart API
Thanks for the reply. Yes, it is the mailing system.
Here is an example (hyperlink near bottom).
I guess I just need to give up on this ever working.

http://lists.contesting.com/archives//html/3830/2011-07/msg00220.html
Howie

On Jul 7, 5:12 pm, duniyadnd <umangb...@gmail.com> wrote:
> It looks like your mail client is urlencoding<http://www.w3schools.com/TAGS/ref_urlencode.asp>the link. It could be doing this as a safety mechanism. Does your mail

Howie

unread,
Jul 12, 2011, 6:13:44 PM7/12/11
to Google Chart API
SOLVED- URL ENCODING

Mr Beri ---

***WOW, a huge THANK YOU !!! ***
I just could not put my finger on the problem.
My initial failure -DOES- occur on a non ascii character that google
charts generates '|'
The W3schools hyperlink you referenced said to substitude '%7c' for
the non-ascii '|'.
--Just So ! Because C formatting thinks % prefixes substitution, I had
to write strings as below, but it works.

In my case, the C code change ended up being:
fprintf(fpo,"http://chart.apis.google.com/chart?chf=bg,lg,0,EFEFEF,
0,BBBBBB,1\%sc,lg,0,EFEFEF,0,BBBBBB,1&chxl=0:\%s1\%s2\%s3\%s4\%s5\%s6\
%s1:\%s0\%s10\%s20\%s2:\%sQso/5min&chxp=2,10&chxr=0,0,6\%s1,-5,20\
%s2,0,20&chxs=0,FF0000,10.5,0.5,l,0000FF\%s1,0000FF,11.5,0,l,676767\
%s2,0000FF,13.5,0,l,
676767&chxt=x,y,r&chs=500x210&cht=bvg&chco=76A4FB&chds=0,20&chd=t:%d,
%d,%d,%d,%d,%d&chdlp=l&chg=20,50&chma=20,20&chtt=%s+Segment
+Analysis&chts=000000,13.5\n","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C","%7C",s1,s2,s3,s4,s5,s6,call1);
THANK YOU so much !!!

It will be a couple of days before i can test this over the mail
reflector, but everything indicates that was the problem---THANKS !

Howie



On Jul 7, 5:12 pm, duniyadnd <umangb...@gmail.com> wrote:
> It looks like your mail client is urlencoding<http://www.w3schools.com/TAGS/ref_urlencode.asp>the link. It could be doing this as a safety mechanism. Does your mail
> client do this or all emails? Did you try sending yourself a URL for
> something else that was not related to Google charts, and if you get a
> similar issue, then the issue is not with Google Charts, but with your
> mailing system.

duniyadnd

unread,
Jul 14, 2011, 4:33:24 PM7/14/11
to google-c...@googlegroups.com
Wow... glad you figured out the problem and solution!
Reply all
Reply to author
Forward
0 new messages