To Have Loved and Lost
One of the most painful losses of 2019 was the final shutdown of the Google Image Charts API. Yes, we all knew for years that it was coming. But it still hurt! The API was absolutely a life safer for QlikView projects. For those who never had the chance to use it, it was beautiful in its simplicity: you could write a long URL with all sorts of chart parameters and...(drumroll)...the URL would return an image containing the chart you had just described! It unlocked the ability to create visualizations in QlikView that would otherwise be impossible, such as bullet charts. OK, so you couldn't click the images; but it was still awesome when used appropriately.
A New Hope
When Google yanked the API, a gentleman by the name of Ian Webster came to the rescue. He created a free web service called QuickChart. It wasn't identical to Google in terms of syntax (QuickChart is based on the popular open source Chart.js library) but otherwise it worked about the same: pass in a bunch of options as URL parameters, get an image back.
Excitedly, I began showing QuickChart to my QlikView customers, touting it as a replacement solution for Google. But they were understandably skittish. Who's to say this API won't go the way of Google's in a week, a month, or a year? There were certainly no guarantees that it wouldn't. Just like any other free online tool that is offered without warranty or SLA, it can be taken down without any notice whatsoever.
But QuickChart had one distinct advantage over Google: it was open source. And, even better, the author had thoughtfully packaged all the parts as a Docker image. It can be intimidating standing up a full Linux environment and installing dependencies correctly, especially if you don't have an expert understanding of how all those dependencies work. But the beauty of containerized solutions like Docker is that everything you need to run a program (all the way from key operating system components to libraries) is combined into a single neat package. All that's missing is a bow on top.
This type of open source solution of course changes everything. You can completely eliminate the risk of a service going away without warning if you yourself have total control control over its server. It also gives you power over server performance. Do you find that things are working a bit slowly? Just tweak the amount of RAM a container gets. And security concerns are vastly reduced with containers; they are isolated environments that are entirely self-contained. You just open a pin-prick port at the very end to let it communicate with the world.
And as far as availability goes, you don't even need an internet connection once the initial setup is complete. So no more worrying about a service outage due to that.
Do It Yourself
I'm a newbie at containers. Considering how new the technology itself is, perhaps that isn't so surprising. As I was figuring out the below steps through painful trial and error, it occurred to me that maybe I wasn't alone, maybe a step-by-step guide would be useful to others. So, without further ado, here's Setting Up A Private Image Server for Dummies.
Testing It Out
Here's an example of a URL that produces an image using Infinity Insight's very own fledgling private image server. Here's another one. And one more. Oh, and did I mention that it creates QR codes that you can embed into your apps to let users scan them with their phones? Because it does. And here's a QVW showing how images such as these can be embedded in a real QlikView application:
Anyone who wants to run some tests against our server is welcome, or you can use the original QuickCharts website itself, of course. Feel free to use our server as a sandbox before you bite the bullet and stand up your own. It's really a pretty soft bullet though, so don't be scared to bite it. As always, if you found any of this content helpful or have any questions, let me know in the comments below. I can't guarantee I'll be able to answer the tough questions, but I'll do my best!
Good stuff! Thanks for sharing Vlad. I was also sad to see the Google Image Charts service being shut down and was not aware of this alternative. It’s a good approach for some use cases and there’s great value in its simplicity.
I agree that guided analytics has a well deserved place in the data ecosystem, even if it doesn’t have all the shiny new tech.
Thanks for reading, Miguel!