Google Charts / Image Charts - QR Code API Depreciated??

2,431 views
Skip to first unread message

Jonathan Cachat

unread,
Jun 9, 2020, 4:35:50 PM6/9/20
to Google Chart API
Good Afternoon Everyone -

I am brushing up an old piece of code that called the Google Charts API to generate QR Codes for items in a database. The original code, which calls the charts API via 'https://chart.googleapis.com/chart' still works - in that is returns a QR Image. But it only works in this original script. If i just duplicate that code file, and make unrelated changes (Charts API URL same, but dimensions of page where QR code image is placed modify) - for some reason it breaks. the error message is "could not retrieve QR Chart from Google" - so API URL is same, some other elements in the php code are changed. 

1) Is the google apis chart truly depreciated, in that regardless of what works and what breaks - it would be wise to transistion away from Google Charts?? for example, use https://documentation.image-charts.com/qr-codes/ Image-Charts.com's API??

2) Any thoughts why it would work on original php file, but not a duplicate of that file with dimension variables changed?? (PdfQrCode.php is original, ZebraLabels.php is modified - both attached)

Any insight at all, greatly appreciated...

JC


PdfQrCode.php
ZebraLabel.php
GoogleCharts.php
ImageCharts.php

Jon Orwant

unread,
Jun 9, 2020, 4:53:07 PM6/9/20
to google-c...@googlegroups.com
On Tue, Jun 9, 2020 at 4:35 PM Jonathan Cachat <cac...@gmail.com> wrote:
Good Afternoon Everyone -

I am brushing up an old piece of code that called the Google Charts API to generate QR Codes for items in a database. The original code, which calls the charts API via 'https://chart.googleapis.com/chart' still works - in that is returns a QR Image. But it only works in this original script. If i just duplicate that code file, and make unrelated changes (Charts API URL same, but dimensions of page where QR code image is placed modify) - for some reason it breaks. the error message is "could not retrieve QR Chart from Google" - so API URL is same, some other elements in the php code are changed. 

1) Is the google apis chart truly depreciated, in that regardless of what works and what breaks - it would be wise to transistion away from Google Charts?? for example, use https://documentation.image-charts.com/qr-codes/ Image-Charts.com's API??

It is wise to transition away from Google *Image* Charts (the service where you provide a URL and get a static image in return). Google Charts (the JavaScript library that generates dynamic charts) is not deprecated. However, it doesn't generate QR codes. There are other threads on this newsgroup that suggest alternatives.


2) Any thoughts why it would work on original php file, but not a duplicate of that file with dimension variables changed?? (PdfQrCode.php is original, ZebraLabels.php is modified - both attached)

No, there's no reason why that would be the case. The service hasn't changed. I've lowered the server capacity to encourage people to switch, but that can't explain why it would work for one dimension but not another. There are restrictions on how large an image one can generate, and how long the URL can be, but those restrictions aren't recent.

Jon
 

Any insight at all, greatly appreciated...

JC


--
You received this message because you are subscribed to the Google Groups "Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chart-a...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chart-api/42ed315a-a52c-42f4-95a3-7b57a9a92b21o%40googlegroups.com.

Jonathan Cachat

unread,
Jun 9, 2020, 5:24:49 PM6/9/20
to Google Chart API
appreciate the insight Jon. What is unusual is that the original API process - via https://chart.googleapis.com/chart - was infact returning QR Codes. It never timed out on us or anything - now may its just the same QR code over and over - but as originally programmed, using Google API for QR Code generation - still functions properly. 

I am trying to switch over to image-charts.com for QR code generation, it seems like they use the same URL syntax as google, so less changes to the code base. However, not thar we are at the end of the day - of course everything now is stuck "in progress" - just pinwheeling over here...


Francois-Guillaume Ribreau

unread,
Jun 10, 2020, 10:28:44 AM6/10/20
to google-c...@googlegroups.com
Hello Image-Charts.com founder here :)

Indeed, Image-Charts is 100% compatible with Google Image-Charts for generated QRCode and has the best infrastructure (3 data-centers around the world) for 100% uptime over the past 11 months and < 500ms latency.

Let me know if you need any help!

On Tue, Jun 9, 2020 at 11:24 PM Jonathan Cachat <cac...@gmail.com> wrote:
appreciate the insight Jon. What is unusual is that the original API process - via https://chart.googleapis.com/chart - was infact returning QR Codes. It never timed out on us or anything - now may its just the same QR code over and over - but as originally programmed, using Google API for QR Code generation - still functions properly. 

I am trying to switch over to image-charts.com for QR code generation, it seems like they use the same URL syntax as google, so less changes to the code base. However, not thar we are at the end of the day - of course everything now is stuck "in progress" - just pinwheeling over here...


--
You received this message because you are subscribed to the Google Groups "Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chart-a...@googlegroups.com.

Ian Webster

unread,
Jun 10, 2020, 5:55:56 PM6/10/20
to Google Chart API
For future onlookers who would prefer an open-source alternative, I've added drop-in compatibility for Google Image Charts' QR code format to QuickChart.


https://quickchart.io/chart?cht=qr&chs=150x150&chl=Hello%20world

Enjoy,

Ian

Trail Boy

unread,
Jun 11, 2020, 12:24:16 PM6/11/20
to Google Chart API

Hi Francois-Guillaume and Ian

I have a question about the use of your QR code generating services.

I represent a large UK school that quite regularly has to create maybe a few thousand QR codes within a google sheets spreadsheet for our pupils.

Until deprecation, the google creator worked perfectly for years.

Afterwards, I did extensively test both of yours (and others) online QR code generators within our large sheets, but found that there were often many missing gaps within the large column of QR codes where for no (apparent) reason, a QR code simply would not appear in the cell no matter what we did.  There were often missing gaps within much smaller sheets as well, with perhaps a column of 100 QR code generations.  Because of this, we had to go to Zint on the desktop which is not anywhere near as convinient as you can imagine.

I have just tried it today and both are working perfectly. 

Has anything changed?  Are we abusing the service by attempting to load a few thousand QR codes in one sheet perhaps a few times a year?

Thanks for your time
Kris


Francois-Guillaume Ribreau

unread,
Jun 11, 2020, 3:07:36 PM6/11/20
to google-c...@googlegroups.com
On Thu, Jun 11, 2020 at 6:24 PM Trail Boy <trailb...@gmail.com> wrote:

Hi Francois-Guillaume and Ian

I have a question about the use of your QR code generating services.

I represent a large UK school that quite regularly has to create maybe a few thousand QR codes within a google sheets spreadsheet for our pupils.

Until deprecation, the google creator worked perfectly for years.

Afterwards, I did extensively test both of yours (and others) online QR code generators within our large sheets, but found that there were often many missing gaps within the large column of QR codes where for no (apparent) reason, a QR code simply would not appear in the cell no matter what we did.  There were often missing gaps within much smaller sheets as well, with perhaps a column of 100 QR code generations.  Because of this, we had to go to Zint on the desktop which is not anywhere near as convinient as you can imagine.

I have just tried it today and both are working perfectly. 

Has anything changed?
Nope, we did not change anything at Image-Charts, lots of customers rely on our service to do QR code generations in sheets for years :)
 
  Are we abusing the service by attempting to load a few thousand QR codes in one sheet perhaps a few times a year?
Not at all, enjoy Kris!

Thanks for your time
Kris


--
You received this message because you are subscribed to the Google Groups "Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chart-a...@googlegroups.com.

Ian Webster

unread,
Jun 11, 2020, 11:21:40 PM6/11/20
to Google Chart API
Hi Kris,

I would guess that maybe you're hitting rate limits while simultaneously loading 1000+ QR codes.  I'm happy to set you up with a key to disable rate limitations + any extra troubleshooting because you are working in education!  Send me an email i...@quickchart.io and I can give you the details.

Ian
Reply all
Reply to author
Forward
0 new messages