Was this page helpful?

Google Status Indicator (Charts)

    Table of contents
    No headers

     

    The google status indicator is a great graph if all your doing is measuring 0 to 100.  Unfortunatly this was not included in the Google Chart extention, so I created this template to bridge the gap.

    Just copy the template below into a new template page.  (Ensure you use source mode). 

    <h1>Template:GoogleStatusIndicator</h1>
    <p>{{ <br />
    var value = ($0 ?? args.value ?? '0');<br />
    var text = ($1 ?? args.text ?? '');<br />
    var height = ($2 ?? args.height ?? '250');<br />
    var width = ($3 ?? args.width ?? '100');<br />
    var hw = height ..'x' ..width;<br />
    <br />
    web.image('http://chart.apis.google.com/chart?chs=' ..hw ..'&amp;cht=gom&amp;chd=t:' ..value ..'&amp;chl=' ..web.uriencode(text)); <br />
    <br />
    }}</p>

    Here is an example of how to use the template:

    {{ template.GoogleStatusIndicator{value: '50', text: 'Testing My Text', height: '500', width: '250'} }}
    

     The output would look like this:

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by