Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

Horizontal Heat Map chart

JSON used as input for Horizontal heat map chart rendering consists of multiple elements.

Table of Contents
minLevel3

Basic structure

Code Block
{
  "x_axis": {
    "labels": {
      "labels": [ ... ]
    }
  }
  "y_axis": {
    "labels": {
      "labels": [ ... ]
    }
  }
  "elements": [
    {
      "type": "multihbar",
      "values": [ ... ]
    }
  ]
}

Common elements

NameDescriptionExample
chartId
Chart view identifier. Refer to REST API.
chart_36-ea2T3h3snN
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

Code Block
{
	"chartId": "chart_36-ea2T3h3snN",
	"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": {}
} 

"x_axis" content

X axis is defined by colour, grid-coloursteps and labels.

NameDescriptionExample
colour
Color of the axis label
#e9e9e9
grid-colour
Color of the x-axis grid (horizontal)
#e9e9e9
steps
Size of the steps of the axis0
labels

Nested object defining the axis labels

NameDescriptionExample
colour
Color of the labels
#4e4e4e
labels
Array of labels to display
[ "2013", "2014", "2015" ]
 

 

Example:

Code Block
"x_axis": {
    "colour": "#e9e9e9",
    "grid-colour": "#e9e9e9",
    "steps": 0,
    "labels": {
      "colour": "#4e4e4e",
      "labels": [
        "2013",
        "2014",
        "2015"
      ]
    }
  }

"y_axis" content

NameDescriptionExample
colour
Color of the axis label
#e9e9e9
grid-colour
Color of the y-axis grid (horizontal)
#e9e9e9
steps
Size of the steps of the axis1
min
Minimal value displayed on the axis1
max
Maximal value displayed on the axis2
offset
Offset of the steps of the axis1
labels

Nested object defining the axis labels

NameDescriptionExample
colour
Color of the labels
#4e4e4e
labels
Array of labels to display
[ "Austria", "Canada" ]
 

Example:

Code Block
 "y_axis": {
    "colour": "#e9e9e9",
    "grid-colour": "#e9e9e9",
    "steps": 1,
    "offset": 1,
    "min": 1,
    "max": 2,
    "labels": {
       "colour": "#4e4e4e",
       "labels": [ "Austria", "Canada" ]
    }
 },

"elements" content

Each object in array elements describe one chart element. In example below we have only one element, that has type multihbar and contains array with 2 values (in example below Austria and Canada). Each value is an array that contains value objects. In example below first value array is for Austria and consists of left, right, tool tip, colour, alpha and context.

NameDescriptionExample
type
Type of the chart. For horizontal heat map chart, the value is "multihbar"multihbar
values

Array of value arrays

NameDescriptionExample
left
Numerical value specifying the left position of a bar
0
right
Numerical value specifying the right position of a bar
1
tip
Tooltip text to display on mouse hover
"Austria\n2013 (Revenue)\n173535 / 222172"
colour
Color used for a bar#b5cb04
alpha
Alpha channel that specifies the opacity of the bar.0.25
context
If defined, context will be send to the client as event parameter 
 
Code Block
 "elements": [
    {
      "type": "multihbar",
      "values": [
        [
          {
            "right": 1,
            "left": 0,
            "tip": "Austria\n2012 (Revenue)\n48637 / 222172",
            "colour": "#4379bd",
            "alpha": "0.2156665431193521",
            "context": "{\"dataLink\":\"36_1097194719\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\",\"dateInterval\":{\"from\":\"2012-01-01\",\"to\":\"2012-12-31\"}}"
          },
          {
            "right": 2,
            "left": 1,
            "tip": "Austria\n2013 (Revenue)\n173535 / 222172",
            "colour": "#4379bd",
            "alpha": "0.5501983721763353",
            "context": "{\"dataLink\":\"36_-792896568\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\",\"dateInterval\":{\"from\":\"2013-01-01\",\"to\":\"2013-12-31\"}}"
          },
          {
            "right": 3,
            "left": 2,
            "tip": "Austria\n2014 (Revenue)\n109801 / 322172",
            "colour": "#4379bd",
            "alpha": "0.3794904932017772",
            "context": "{\"dataLink\":\"36_-792896568\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\",\"dateInterval\":{\"from\":\"2014-01-01\",\"to\":\"2014-12-31\"}}"
          }
        ],
        [
          {
            "right": 1,
            "left": 0,
            "tip": "Canada\n2012 (Revenue)\n42788 / 584257",
            "colour": "#b5cb04",
            "alpha": "0.2",
            "context": "{\"dataLink\":\"36_1288031050\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\",\"dateInterval\":{\"from\":\"2012-01-01\",\"to\":\"2012-12-31\"}}"
          },
          {
            "right": 2,
            "left": 1,
            "tip": "Canada\n2013 (Revenue)\n341469 / 584257",
            "colour": "#b5cb04",
            "alpha": "1.0",
            "context": "{\"dataLink\":\"36_-602060237\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\",\"dateInterval\":{\"from\":\"2013-01-01\",\"to\":\"2013-12-31\"}}"
          },
          {
            "right": 3,
            "left": 2,
            "tip": "Canada\n2014 (Revenue)\n192217 / 584257",
            "colour": "#b5cb04",
            "alpha": "0.6002370421955197",
            "context": "{\"dataLink\":\"36_-602060237\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\",\"dateInterval\":{\"from\":\"2014-01-01\",\"to\":\"2014-12-31\"}}"
          }
        ]
      ]
    }
  ]

Examples

Attachments
uploadfalse
oldfalse
sortByname

 

Sv translation
languageja

水平ヒートマップチャート

水平ヒートマップチャートレンダリングの入力として使用されるJSONは、複数の要素で構成されています。

Table of Contents
minLevel3

基本的な構造

Code Block
{
  "x_axis": {
    "labels": {
      "labels": [ ... ]
    }
  }
  "y_axis": {
    "labels": {
      "labels": [ ... ]
    }
  }
  "elements": [
    {
      "type": "multihbar",
      "values": [ ... ]
    }
  ]
}

共通の要素 

説明
chartId
チャートビュー識別子。 RESTAPIをご参照してください。
chart_36-ea2T3h3snN
bg_color
チャートの全体に背景の色を定義します
#e5e5e5
is_decimal_separator_comma
小数点記号としてカンマを使用/非使用を決定します。 [0, 1]1
is_thousand_separator_disabled
桁区切りを使用/非使用を決定します [0, 1]1
tooltip

チャートの全体に基本的なツールチップの設定を定義します

説明
mouse
マウス感度2
shadow
[true, false]true
stroke
[0, 1]1
colour
ツールチップのの色フォントデフォルト
#202020
background
ツールチップの背景デフォルト
"#ffffff"
 

Code Block
{
	"chartId": "chart_36-ea2T3h3snN",
	"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": {}
} 

「x_axis」コンテンツ

X軸はグリッド色ステップおよびラベルによって定義されます。

説明
colour
軸ラベルの色
#e9e9e9
grid-colour
x軸グリッドの色(水平方向)
#e9e9e9
steps
軸ステップサイズ0
labels

ネストされたオブジェクト軸ラベルを定義します

説明
colour
ラベルの色
#4e4e4e
labels
表示ためのラベルの配列
[ "2013", "2014", "2015" ]
 

 

例:

Code Block
"x_axis": {
    "colour": "#e9e9e9",
    "grid-colour": "#e9e9e9",
    "steps": 0,
    "labels": {
      "colour": "#4e4e4e",
      "labels": [
        "2013",
        "2014",
        "2015"
      ]
    }
  }

「y_axis」コンテンツ

 

説明
colour
軸ラベルの色
#e9e9e9
grid-colour
y軸グリッドの色(水平)
#e9e9e9
steps
軸ステップサイズ1
min
軸上に表示した最小値1
max
軸上に表示した最大値2
offset
軸のステップのオフセット1
labels

ネストされたオブジェクト軸ラベルを定義します

説明
colour
ラベルの色
#4e4e4e
labels
ラベルと値の配列
[ "Austria", "Canada" ]
 

 

例:

Code Block
 "y_axis": {
    "colour": "#e9e9e9",
    "grid-colour": "#e9e9e9",
    "steps": 1,
    "offset": 1,
    "min": 1,
    "max": 2,
    "labels": {
       "colour": "#4e4e4e",
       "labels": [ "Austria", "Canada" ]
    }
 },

「要素」コンテンツ

要素配列内の各オブジェクトは、1つのチャート要素を記述します。以下の例では、multihbarタイプを持つ要素が1つしかなく、2つの値を持つ配列を含まれています(以下の例ではオーストリアカナダ)。各値は、値オブジェクトを含む配列です。下の例では、最初の値の配列はオーストリア向けで、ツールチップカラーアルファおよびコンテキストで構成されています。

説明
type
チャートタイプ。水平ヒートマップチャートの場合、値は「multihbar」としますmultihbar
values

配列値の配列

説明
left
棒の左の位置を指定する数値
0
right
棒の右の位置を指定する数値
1
tip
マウスホバーで表示するツールチップのテキスト
"Austria\n2013 (Revenue)\n173535 / 222172"
colour
棒に使用したカラー#b5cb04
alpha
棒の不透明度を指定するアルファチャンネル0.25
context
定義されている場合、コンテキストがイベントパラメータとしてクライアントに送信されます 
 
Code Block
 "elements": [
    {
      "type": "multihbar",
      "values": [
        [
          {
            "right": 1,
            "left": 0,
            "tip": "Austria\n2012 (Revenue)\n48637 / 222172",
            "colour": "#4379bd",
            "alpha": "0.2156665431193521",
            "context": "{\"dataLink\":\"36_1097194719\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\",\"dateInterval\":{\"from\":\"2012-01-01\",\"to\":\"2012-12-31\"}}"
          },
          {
            "right": 2,
            "left": 1,
            "tip": "Austria\n2013 (Revenue)\n173535 / 222172",
            "colour": "#4379bd",
            "alpha": "0.5501983721763353",
            "context": "{\"dataLink\":\"36_-792896568\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\",\"dateInterval\":{\"from\":\"2013-01-01\",\"to\":\"2013-12-31\"}}"
          },
          {
            "right": 3,
            "left": 2,
            "tip": "Austria\n2014 (Revenue)\n109801 / 322172",
            "colour": "#4379bd",
            "alpha": "0.3794904932017772",
            "context": "{\"dataLink\":\"36_-792896568\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\",\"dateInterval\":{\"from\":\"2014-01-01\",\"to\":\"2014-12-31\"}}"
          }
        ],
        [
          {
            "right": 1,
            "left": 0,
            "tip": "Canada\n2012 (Revenue)\n42788 / 584257",
            "colour": "#b5cb04",
            "alpha": "0.2",
            "context": "{\"dataLink\":\"36_1288031050\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\",\"dateInterval\":{\"from\":\"2012-01-01\",\"to\":\"2012-12-31\"}}"
          },
          {
            "right": 2,
            "left": 1,
            "tip": "Canada\n2013 (Revenue)\n341469 / 584257",
            "colour": "#b5cb04",
            "alpha": "1.0",
            "context": "{\"dataLink\":\"36_-602060237\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\",\"dateInterval\":{\"from\":\"2013-01-01\",\"to\":\"2013-12-31\"}}"
          },
          {
            "right": 3,
            "left": 2,
            "tip": "Canada\n2014 (Revenue)\n192217 / 584257",
            "colour": "#b5cb04",
            "alpha": "0.6002370421955197",
            "context": "{\"dataLink\":\"36_-602060237\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\",\"dateInterval\":{\"from\":\"2014-01-01\",\"to\":\"2014-12-31\"}}"
          }
        ]
      ]
    }
  ]

 

Attachments
uploadfalse
oldfalse
sortByname