1

Currently working through Integrating Visualforce and Google Charts.

After a bit of debugging, I managed to get my code to create a working URL for a chart, e.g.:

http://chart.apis.google.com/chart?chs=600x300&chtt=Time+vs|Distance&chxt=x,y,x,y&chxr=0,0,10,1|1,0,65,5&chxl=2:|Seconds|3:|Meters&cht=bvs&chd=s:BBCDFINVi3

However, the with this chart does not render as expected.

I tried replacing "{!chartUrl}" with "https://sledgehammer.eu3.visual.force.com/img/seasonLogos/2015_winter_aloha.png" (the SFDC logo) and confirmed that the logo will appear when the chart is expected to appear.

So, I'm guessing the problem has to do with cross-site security?

Is there a fix for this?

1

The URL you are using for the chart is http and not https. Your browser is probably blocking the unsecure link since the rest of the page is on https. The Google chart API is deprecated and I don't think it supports https. You should look instead at using Visualforce charting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.