geckoboard-push#
DataSets API####
NodeJS implementation of the Geckoboard legacy API, this has been replaced with a a newInstall##
npm install geckoboard-push
Usage##
var Geckoboard = ; var foo = api_key: 'geckoboard_api_key';
Options###
Required####
- api_key The key given to you in your account settings under API
Optional####
(These options should never need to be changed)
- params.host defaults to
push.geckoboard.com
- port defaults to
443
for https - method defaults to
POST
- path defaults to
'/v1/send/' + current_widget_key
Methods##
Details of types can be found at geckoboards docs:
- http://www.geckoboard.com/developers/custom-widgets/widget-types/
- http://www.geckoboard.com/developers/widget-editor/advanced/
Map###
var bar = foo;bar
Items is an Array of Objects
city: city_name: "london" country_code: "GB" region_code: "P5" size: 8 /*Optional. Default = 3 */ color: "d8f709" /*Optional. Hex color.*/ cssclass: "mycss" /*Optional. Allows for custom CSS on the geckoboard dashboard */ city: city_name: "San Francisco" region_code: "CA" country_code: "US" latitude: "51.526263" longitude: "-0.092429" latitude: "-33.94336" longitude: "18.896484" host: "geckoboard.com" ip: "178.125.193.227"
Monitoring###
var bar = foo;bar;
status can have the values 'Up' and 'Down', downTime and responseTime are optional
Number###
var bar = foo;bar;
Items is an Array of Objects
text : "Some Text" value : 123 text : "Some more Text" value : 238 prefix: "£"
Absolute allows you to show numerical differences instead of Percentage based - defaults to false
, can be set to true
Type allows you to reverse the colours - defaults to standard
, set to reverse
or standard
Text###
var bar = footext'text_widget_key';bar;
Items is an Array of Objects
text: "message c" type : 0 text : "message d" type : 2 text : "message e" type : 1
Type has three different values:
0
- None (no corner icon)1
- Alert (yellow corner icon)2
- Info (grey corner icon)
There can be up to 10 of these Objects The text can be plain or styled HTML
Bullet###
var bar = foo;bar;
Items is an Array of Objects
label: "Revenue 2011 YTD" sublabel: "(U.S. $ in thousands)" axis: point: 0 200 400 600 800 1000 range: color: "red" start: 0 end: 400 color: "amber" start: 401 end: 700 color: "green" start: 701 end: 1000 measure: current: start: 0 end: 500 projected: start: 100 end: 900 comparative: point: 600
Orientation is the orientation you'd like the bullet widgets, default is horizontal
, but can be changed to vertical
Rag Column###
var bar = foo;bar
Items is an array of Objects
value: 120 text: "Red description" value: 75 text: "Amber description" value: 5 text: "Green description"
The type parameter accepts one value reverse
. If supplied then the order of the items will be reversed.
Rag###
var bar = foo;bar
Items is an array of Objects
value: 120 text: "Red description" value: 75 text: "Amber description" value: 5 text: "Green description"
The type parameter accepts one value reverse
. If supplied then the order of the items will be reversed.
Funnel###
var bar = foo;foo
Items is an Array of Objects
value: "87809" label: "Step1" value: "70022" label: "Step2" value: "63232" label: "Step 3" value: "53232" label: "Step 4" value: "32123" label: "Step 5" value: "23232" label: "Step 6" value: "12232" label: "Step 7" value: "2323" label: "Step 8"
Type allows you to reverse the colours - defaults to standard
, set to reverse
or standard
Percentage allows you to show or hide % - defaults to show
, set to show
or hide
Pie###
var bar = foo;bar
Items is an Array of Objects
value: "100" label: "May" colour: "FFFF10AA" value: "160" label: "June" colour: "FFAA0AAA" value: "300" label: "July" colour: "FF5505AA" value: "140" label: "August" colour: "FF0000AA"
The last 2 digits in the hex colour attribute are entirely optional and represent the desired transparency.
Gecko Meter###
var bar = foo;bar
Value is the Value of the meter Min is an Object
text : "Min value" value : "10"
Max is an Object
text: "Max value" value: "30"
Type allows you to reverse the colours - defaults to standard
, set to reverse
or standard
Line###
var bar = foo;bar
Items is an Array of values
"label": "name": "Label1" "color": "#d4e1aa" "title": "text": "Important information 1" "highlight": true "description": "A small description" "title": "text": "Important information 2" "highlight": true
Settings is an Object which contains x and y axis detail and colour detail in hex format
"axisx": "Jun" "Jul" "Aug" "axisy": "Min" "Max" "colour": "ff9900"
LineV2###
var linev2 = foo;linev2
data is an object as definined by the Geckoboard API
"y_axis": "format": "currency" "unit": "USD" "series": "name": "GBP -> USD" "data": 162529 156991 150420 152265 155356 151930 152148 151173 155170 161966 159255 163762
List###
var bar = foo;bar
Items is an Array of values as defined by the Geckoboard API
"title": "text": "Chrome" "label": "name": "New!" "color": "#ff2015" "description": "40327 visits" "title": "text": "Safari" "description": "11577 visits" "title": "text": "Firefox" "description": "10296 visits" "title": "text": "Internet Explorer" "description": "3587 visits" "title": "text": "Opera" "description": "499 visits"
Highchart###
var bar = foo;bar
highchart is a Highchart configuration object - see: http://www.geckoboard.com/developers/custom-widgets/widget-types/highcharts/
chart: renderTo: 'container' credits: enabled: false series: your_stuff
Examples##
var Geckoboard = ; var gecko = api_key: 'geckoboard_api_key'; var map = gecko;map var number = gecko;number; var text = geckotext'text_widget_key';text; var bullet = gecko;bullet; var ragColumn = gecko;ragColumn var rag = gecko;rag var funnel = gecko;funnel var pie = gecko;pie var geckometer = gecko;geckometer var line = gecko;line var highchart = gecko;highchart
Leaderboard###
var bar = foo;bar
Items is an Array of values
"label": "Something gaining" "value": 100 "previous_rank": 3 "label": "Something staying" "value": 90 "label": "Something losing" "value": 80 "previous_rank": 1
Bar###
var barChart = foo;bar
data is an object as definined by the Geckoboard API
"x_axis": "labels": "2000" "2001" "2002" "2003" "2004" "2005" "y_axis": "format": "currency" "unit": "USD" "series": "data": 1000 1500 30600 28800 22300 36900
Format allows you to optionally change the number format. Defaults to decimal.
Unit is a ISO 4217 currency code. Required when format is currency.
NPM Maintainers##
The npm module for this library is maintained by:
License##
geckoboard-push is licensed under the MIT license.