Visualising search relevance with Google charts

Warning This article was written over six months ago, and may contain outdated information.

Some search engines, particularly on content management systems, give a percentage figure for the relevance of a result to your search term. When viewing a lot of results on a page, the figures can tend to run into one another and be hard to quickly distinguish.

This was the case with a client site I’m building using CMS Made Simple at the moment, and the results page suffered from a lack of clarity. Thinking of a way to simplify the page, I remembered the old adage “a picture is worth a thousand words” and hit upon the idea of using Google’s Chart API to replace the figures:

<img src="{$entry->weight}&chs=32x16" alt="Bar chart showing {$entry->weight}%" title="{$entry->weight}%" />

That made the resulting output very easy to understand at a glance:

Bar chart showing different values

There’s nothing spectacular or groundbreaking about this technique, I just used it on a site I’m building and thought it would be nice to share. Plus, it gave me the chance to do a little promotion for CMSMS, which I use a lot.

Comments are closed.