Thermometer chart

JSON used as input for Thermometer chart rendering consists of multiple elements.

Basic structure

{
  "t_axis": {
    "labels": {
      "labels": [ ... ]
    }
  }
  "elements": [
    {
      "type": "thermometer",
      "values": [ ... ]
    }
  ]
}

Common elements

NameDescriptionExample
chartId
Chart view identifier. Refer to REST API.
chart_3-FDEp6Q41fb_s3fwVc7F9H
bg_color
Defines the color of the background for the entire chart
#e5e5e5
is_decimal_separator_comma
Determines whether to use comma as decimal separator. [0, 1]1
is_thousand_separator_disabled
Determines whether to use the thousands separator or not. [0, 1]1
tooltip

Defines the basic tooltip settings for the entire chart.

NameDescriptionExample
mouse
Mouse sensitivity2
shadow
[true, false]true
stroke
[0, 1]1
colour
Default font color for tooltips
#202020
background
Default background for tooltips.
"#ffffff"
 

Example

{
	"chartId": "chart_3-FDEp6Q41fb_s3fwVc7F9H",
	"bg_colour": "#e5e5e5",
	"is_decimal_separator_comma": 1,
	"is_thousand_separator_disabled": 1,
	"tooltip": {
	    "mouse": "2",
    	"shadow": true,
	    "stroke": 1,
	    "colour": "#202020",
	    "background": "#ffffff"
	},
	"options": {}
} 

"t_axis" content

T axis is defined by min and max value, size of one step (steps) and labels. Each label consists of value on T axis (y) and displayed text. You can specify also colour and grid-colour for T axis.

NameDescriptionExample
colour
Color of the axis label
#e9e9e9
grid-colour
Color of the T-axis grid (vertical)
#e9e9e9
steps
Size of the steps of the axis100000
min
Minimal value displayed on the axis0
max
Maximal value displayed on the axis800000
labels

Nested object defining the axis labels

NameDescriptionExample
colour
Color of the labels
#4e4e4e
labels
Array of label and values
[ { "text": "0 USD", "y": 0 }, { "text": "100.000 USD", "y": 100000 } ]
 

 

Example:

"t_axis": {
    "colour": "#e9e9e9",
    "grid-colour": "#e9e9e9",
    "steps": 100000,
    "min": 0,
    "max": 800000,
    "labels": {
      "colour": "#4e4e4e",
      "labels": [
        { "text": "0 USD", "y": 0 },
        { "text": "100.000 USD", "y": 100000 },
        { "text": "200.000 USD", "y": 200000 },
        { "text": "300.000 USD", "y": 300000 },
        { "text": "400.000 USD", "y": 400000 },
        { "text": "500.000 USD", "y": 500000 },
        { "text": "600.000 USD", "y": 600000 },
        { "text": "700.000 USD", "y": 700000 },
        { "text": "800.000 USD", "y": 800000 }
      ]
    }
  }

"elements" content

Each object in array elements describe one chart element. In example below we have only one element that has type thermometer and contains array with 4 values. Each value object consists of value, label, tool tip, context and colour.

NameDescriptionExample
type
Type of the chart. For thermometer chart, the value is "thermometer"thermometer
values
NameDescriptionExample
value
Numerical value specifying the top position in thermometer123456.789
tip
Tooltip text to display on mouse hoverThis is tooltip
label
Value label displayed below the thermometerThis is label
colour
Colour of the liquid inside sealed glass tube#4379bd
context
If defined, context will be send to the client as event parameter 
 
 "elements": [
    {
      "type": "thermometer",
      "values": [
        {
          "value": 444835.123456789,
          "label": "Austria",
          "tip": "Austria\n444835 USD",
          "colour": "#4379bd",
          "context": "{\"dataLink\":\"3_-2043221543\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\"}"
        },
        {
          "value": 730974,
          "label": "Canada",
          "tip": "Canada\n730974 USD",
          "colour": "#b5cb04",
          "context": "{\"dataLink\":\"3_-1852385212\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\"}"
        },
        {
          "value": 546650,
          "label": "France",
          "tip": "France\n546650 USD",
          "colour": "#ff4800",
          "context": "{\"dataLink\":\"3_-1863819183\",\"identifierQuery\":\"[L_COUNTRY={France}]\"}"
        },
        {
          "value": 643782,
          "label": "Germany",
          "tip": "Germany\n643782 USD",
          "colour": "#aabbcc",
          "context": "{\"dataLink\":\"3_-547347785\",\"identifierQuery\":\"[L_COUNTRY={Germany}]\"}"
        }
      ]
    }
  ]

Examples

  File Modified
File THERMOMETER_allIndicators_drilldownOnXAxis.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_allIndicators.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_dateInterval_allIndicators_drilldownOnXAxis.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_dateInterval_allIndicators.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_dateInterval_drilldown_allIndicators_drilldownOnXAxis.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_dateInterval_drilldown_allIndicators.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_dateInterval_drilldown_drilldownOnXAxis.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_dateInterval_drilldown.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_dateInterval_drilldownOnXAxis.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_dateInterval.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_drilldown_allIndicators_drilldownOnXAxis.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_drilldown_allIndicators.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_drilldown_drilldownOnXAxis.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_drilldown.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER_drilldownOnXAxis.json Apr 22, 2016 by Lubomir Elko
File THERMOMETER.json Apr 22, 2016 by Lubomir Elko

 

  • No labels