Adding Charts to Your Balloons

Insight is offering a new feature that will make adding google charts to your balloon styles easier and better suited to your changing data. We offer a plugin that will currently offers one chart type, but will soon be expanded to a range of choices. You will also be able to highlight data, filter data by rules, and sort your data.

All of these features can be accessed by adding a URL to your balloon. Here are two examples:

"http://insight.rhizalabs.com/cbi/gchart/gchart?type=line&uuid=~0196de56161fb011deb13f74df7b895b7f&y=area&x=name&w=400&h=300&xsort=1"

View the chart above

"http://insight.rhizalabs.com/cbi/gchart/gchart?type=line&uuid=~01a1caa058055711df93c705302efb6713&y=a_number&x=a_date&w=400&h=300&xsort=1&f_attr=a_number&f_type=gt&f_param1=1"

View the chart above

Everything following the question mark is known as a "parameter". They are what you'll use to customize your chart.

Below are the available parameters and their settings:

  • type: This designates what kind of chart you'll be making. Currently, we only support line graphs. (type=line)
  • uuid: This is the uuid of the dataset you want to pull data from. You can get this string of characters by looking at the information page for any dataset. The uuid will be up in the URL.
  • hl_high: Use this parameter to set the upper bound of a highlighted area. This is an optional parameter.
  • hl_low: Use this parameter to set the lower bound of a highlighted area. This is an optional parameter.
  • y: This is the data that will be displayed along the y axis. Its parameter should be set equal to the name of the attribute.
  • x: This is the data that will be displayed along the x axis. Its parameter should be set equal to the name of the attribute.
  • w: This sets the width of the chart. This is an optional parameter.
  • h: This sets the height of the chart. This is an optional parameter.
  • sort: This sets whether the x-axis data should be sorted. It can be set to 1, as in "xsort=1", if you want your data to be sorted. This is an optional parameter.
  • f_attr: This names the attribute you want to filter by. This is an optional parameter; if it's not set there will be no filtering performed.
  • f_type: This will define the type of filtering you intend to do. There are currently acceptable inputs to specify the filtering preference:
    • gt: "greater than"
    • lt: "less than"
    • btw: "between"
    • eq: "equal to"
    • ne: "not equal to"
  • f_param1: If you are doing filtering you will need this to set a threshold for evaluating the values in your dataset.
  • f_param2: This is used if you need a second variable to define your filtering. Currently, only filters looking for values between two numbers needs this second variable. Otherwise, you can leave it off.

Be careful to keep your parameter names all lower case.

Recent Discussions

26 Apr, 2012 05:46 PM
18 Apr, 2012 01:25 AM
30 Mar, 2012 01:57 PM
05 Jun, 2011 06:58 PM
14 Sep, 2010 03:51 PM