Versions Compared

Key

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

Combined chart

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

Table of Contents
minLevel3

Basic structure

Code Block
{
  "x_axis": {
    "labels": {
      "labels": [ ... ]
    }
  },
  "y_axis": {
    "labels": {
      "labels": [ ... ]
    }
  },
  "y_axis_right": {
    "labels": {
      "labels": [ ... ]
    }
  }
  "elements": [
    {
      "type": ...,
      "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"
 
x_legend

(Optional) Defines legend for X axis (below the chart).

NameDescriptionExample
text
Displayed textThis is legend text
style
CSS style{font-size: 10px; text-align: center;}
 
y_legend

(Optional) Defines legend for Y axis (on the left side of chart).

NameDescriptionExample
text
Displayed textThis is legend text
style
CSS style{font-size: 10px; text-align: center;}


 
y_right_legend

(Optional) Defines legend for Y axis (on the right side of chart).

NameDescriptionExample
text
Displayed textThis is legend text
style
CSS style{font-size: 10px; text-align: center;}
 

Example

Code Block
{
	"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": {},
    "x_legend": {
      "text": "This is X axis legend",
      "style": "{font-size: 10px; text-align: center;}"
    },
    "y_legend": {
      "text": "This is left Y axis legend",
      "style": "{font-size: 10px; text-align: center;}"
    },
    "y_right_legend": {
      "text": "This is right Y axis legend",
      "style": "{font-size: 10px; text-align: center;}"
    }
} 

"x_axis" content

NameDescriptionExample
colour
Color of the axis label
#c7c7c7
grid-colour
Color of the x-axis grid (horizontal)
#c7c7c7
labels

Nested object defining the axis labels

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

Example:

Code Block
 "x_axis": {
    "colour": "#c7c7c7",
    "grid-colour": "#c7c7c7",
    "labels": {
       "colour": "#4e4e4e",
       "labels": [ "Austria", "Canada", "France", "Germany" ]
    }
 },

"y_axis" content

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

NameDescriptionExample
colour
Color of the axis label
#e9e9e9
grid-colour
Color of the y-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:

Code Block
"y_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 }
      ]
    }
  }

"y_axis_right" content

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

NameDescriptionExample
colour
Color of the axis label
#e9e9e9
grid-colour
Color of the y-axis grid (vertical)
#e9e9e9
steps
Size of the steps of the axis10
min
Minimal value displayed on the axis-20
max
Maximal value displayed on the axis40
labels

Nested object defining the axis labels

NameDescriptionExample
colour
Color of the labels
#4e4e4e
labels
Array of label and values
[ { "text": "-20 units", "y": -20 }, { "text": "-10 units", "y": -10 } ]
 

Example:

Code Block
"y_axis_right": {
    "colour": "#e9e9e9",
    "grid-colour": "#e9e9e9",
    "steps": 10,
    "min": -20,
    "max": 40,
    "labels": {
      "colour": "#4e4e4e",
      "labels": [
        { "text": "-20 units", "y": -20 },
        { "text": "-10 units", "y": -10 },
        { "text": "0 units", "y": 0 },
        { "text": "10 units", "y": 10 },
        { "text": "20 units", "y": 20 },
        { "text": "30 units", "y": 30 },
        { "text": "40 units", "y": 40 }
      ]
    }
  }

"elements" content

Each object in array elements describe one chart element. Structure of chart element depends on the chart type and therefore please see section "elements" for following chart types supported in combined chart:

There is only one additional configuration in chart element - "axis" that specifies which Y axis should be used to render values of this element.

NameDescriptionExample
axis
Specifies Y axis that should be used to render values of this element. Default: "left"right

In example below we have only one simple bar chart element that is related to Y axis on the "right" side of a chart:

Code Block
 "elements": [
    {
      "type": "bar",
      "axis": "right",
      "text": "Revenue",
      "font-size": 10,
      "colour": "#4379bd",
      "values": [
        {
          "top": 444835.123456789,
          "tip": "Austria\n444835.1",
          "label": "444.835",
          "context": "{\"dataLink\":\"3_-2043221543\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\"}"
        },
        {
          "top": 730974,
          "tip": "Canada\n730974",
          "label": "730.974",
          "context": "{\"dataLink\":\"3_-1852385212\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\"}"
        },
        {
          "top": 546650,
          "tip": "France\n546650",
          "label": "546.650",
          "context": "{\"dataLink\":\"3_-1863819183\",\"identifierQuery\":\"[L_COUNTRY={France}]\"}"
        },
        {
          "top": 643782.34,
          "tip": "Germany\n643782.3",
          "label": "643.782",
          "context": "{\"dataLink\":\"3_-547347785\",\"identifierQuery\":\"[L_COUNTRY={Germany}]\"}"
        }
      ]
    }
  ]

Examples

Attachments
uploadfalse
oldfalse
sortByname

 

Sv translation
languageja

組み合わされたチャート

組み合わされたチャートレンダリングの入力として使用されるJSONは、複数の要素で構成されています。

Table of Contents
minLevel3

基本的な構造

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

共通の要素 

説明
chartId
チャートビュー識別子。 RESTのAPIをご参照してください。
chart_3-FDEp6Q41fb_s3fwVc7F9H
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"
 
x_legend

(任意)のX軸の凡例を定義する。(以下のチャート)

説明
text
表示されるテキストこれは、凡例のテキストです
style
CSSスタイル{font-size: 10px; text-align: center;}
 
y_legend

(任意)Y軸の凡例を定義します。(チャートの左側)

説明
text
表示されるテキストこれは、凡例のテキストです
style
CSSスタイル{font-size: 10px; text-align: center;}
 
y_right_legend

(任意)Y軸の凡例を定義します(チャートの右側)

説明
text
表示されるテキストこれは、凡例のテキストです
style
CSSスタイル{font-size: 10px; text-align: center;}
 

Code Block
{
	"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": {},
    "x_legend": {
      "text": "This is X axis legend",
      "style": "{font-size: 10px; text-align: center;}"
    },
    "y_legend": {
      "text": "This is left Y axis legend",
      "style": "{font-size: 10px; text-align: center;}"
    },
    "y_right_legend": {
      "text": "This is right Y axis legend",
      "style": "{font-size: 10px; text-align: center;}"
    }
} 

「x_axis」コンテンツ

 

説明
colour
軸ラベルの色
#c7c7c7
grid-colour
x-軸グリッドの色(水平方向)
#c7c7c7
labels

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

説明
colour
ラベルの色
#4e4e4e
labels
表示ためのラベルの配列
[ "Austria", "Canada", "France", "Germany" ]
 

 

例:

Code Block
 "x_axis": {
    "colour": "#c7c7c7",
    "grid-colour": "#c7c7c7",
    "labels": {
       "colour": "#4e4e4e",
       "labels": [ "Austria", "Canada", "France", "Germany" ]
    }
 },

“y_axis”コンテンツ 

Y軸は、最小値と最大値、一つステップのサイズ(ステップ)とラベルによって定義されます。各ラベルは、Y軸(y)上の値が含まれて、テキストを表示しました。また、Y軸の色グリッドを指定できます。

説明
colour
軸ラベルの色
#e9e9e9
grid-colour
y軸グリッドの色(垂直)
#e9e9e9
steps
軸ステップサイズ100000
min
軸上に表示した最小値0
max
軸上に表示した最大値800000
labels

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

説明
colour
ラベルの色
#4e4e4e
labels
ラベルと値の配列
[ { "text": "0 USD", "y": 0 }, { "text": "100.000 USD", "y": 100000 } ]
 

 

例:

Code Block
"y_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 }
      ]
    }
  }

「y_axis_right」コンテンツ 

Right Y軸は、最小値と最大値、一つステップのサイズ(ステップ)とラベルによって定義されます。各ラベルは、Y軸(y)上の値が含まれて、テキストを表示しました。また、Y軸の色グリッドを指定できます。

説明
colour
軸ラベルの色
#e9e9e9
grid-colour
y軸グリッドの色(垂直)
#e9e9e9
steps
軸ステップサイズ10
min
軸上に表示した最小値-20
max
軸上に表示した最大値40
labels

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

説明
colour
ラベルの色
#4e4e4e
labels
ラベルと値の配列
[ { "text": "-20 units", "y": -20 }, { "text": "-10 units", "y": -10 } ]
 

例:

Code Block
"y_axis_right": {
    "colour": "#e9e9e9",
    "grid-colour": "#e9e9e9",
    "steps": 10,
    "min": -20,
    "max": 40,
    "labels": {
      "colour": "#4e4e4e",
      "labels": [
        { "text": "-20 units", "y": -20 },
        { "text": "-10 units", "y": -10 },
        { "text": "0 units", "y": 0 },
        { "text": "10 units", "y": 10 },
        { "text": "20 units", "y": 20 },
        { "text": "30 units", "y": 30 },
        { "text": "40 units", "y": 40 }
      ]
    }
  }

「要素」コンテンツ

要素配列内の各オブジェクトは、1つのチャート要素を記述しますする。チャート要素の構造は、チャートの種類によって異なりますので、組み合わせチャートでサポートされているチャート種類は次の「要素」をご参照してください。

チャート要素には追加の構成が1つしかありません -  チャート要素の唯一つの追加の構成がある。この要素の値をレンダリングするために使用するY軸を指定する 「軸」。

説明
axis
この要素の値を描画するために使用するY軸を指定します。。デフォルト:「左」としますright

以下の例では、チャートの「右」側にY軸に関連する単純な棒チャート要素が1つだけあります。:

Code Block
 "elements": [
    {
      "type": "bar",
      "axis": "right",
      "text": "Revenue",
      "font-size": 10,
      "colour": "#4379bd",
      "values": [
        {
          "top": 444835.123456789,
          "tip": "Austria\n444835.1",
          "label": "444.835",
          "context": "{\"dataLink\":\"3_-2043221543\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\"}"
        },
        {
          "top": 730974,
          "tip": "Canada\n730974",
          "label": "730.974",
          "context": "{\"dataLink\":\"3_-1852385212\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\"}"
        },
        {
          "top": 546650,
          "tip": "France\n546650",
          "label": "546.650",
          "context": "{\"dataLink\":\"3_-1863819183\",\"identifierQuery\":\"[L_COUNTRY={France}]\"}"
        },
        {
          "top": 643782.34,
          "tip": "Germany\n643782.3",
          "label": "643.782",
          "context": "{\"dataLink\":\"3_-547347785\",\"identifierQuery\":\"[L_COUNTRY={Germany}]\"}"
        }
      ]
    }
  ]

 

Attachments
uploadfalse
oldfalse
sortByname