Versions Compared

Key

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

Bar chart

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

Table of Contents
minLevel3

Basic structure

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

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_axis" content

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

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 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", "x": 0 }, { "text": "100.000 USD", "x": 100000 } ]
 

 

Example:

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

"y_axis" content

NameDescriptionExample
colour
Color of the axis label
#c7c7c7
grid-colour
Color of the y-axis grid (vertical)
#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
 "y_axis": {
    "colour": "#c7c7c7",
    "grid-colour": "#c7c7c7",
    "labels": {
       "colour": "#4e4e4e",
       "labels": [ "Austria", "Canada", "France", "Germany" ]
    }
 },

"elements" content

Each object in array elements describe one chart element. In example above we have only one element with text Revenue, that has type hscatter and contains array with 4 values. Each value object consists of x, y, label, tool tip, context. Colour and dot-style can be specified for each element.

NameDescriptionExample
type
Type of the chart. For horizontal scatter chart, the value is "hscatter"hscatter
text
Name of the chart 
font-size
Font size used for displaying text 
colour
Color used for displayed text 
dot-style

Style of the dot

NameDescriptionExample
type
 star
halo-size
 10
dot-size
 6


 
values
NameDescriptionExample
x
Numerical value specifying the x position of a dot1
y
Numerical value specifying the y position of a dot456.78
tip
Tooltip text to display on mouse hoverThis is tooltip
label
Value label displayed next to dot (optional)This is label
context
If defined, context will be send to the client as event parameter 
 
Code Block
 "elements": [
    {
      "type": "hscatter",
      "text": "Revenue",
      "font-size": 10,
      "colour": "#4379bd",
      "dot-style": {
        "type": "solid-dot",
        "halo-size": 2,
        "dot-size": 2
      },
      "values": [
        {
          "x": 444835.123456789,
          "y": 0,
          "tip": "Austria\n444835.1",
          "label": "444.835 USD",
          "context": "{\"dataLink\":\"3_-2043221543\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\"}"
        },
        {
          "x": 730974,
          "y": 1,
          "tip": "Canada\n730974",
          "label": "730.974 USD",
          "context": "{\"dataLink\":\"3_-1852385212\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\"}"
        },
        {
          "x": 546650,
          "y": 2,
          "tip": "France\n546650",
          "label": "546.650 USD",
          "context": "{\"dataLink\":\"3_-1863819183\",\"identifierQuery\":\"[L_COUNTRY={France}]\"}"
        },
        {
          "x": 643782.34,
          "y": 3,
          "tip": "Germany\n643782.3",
          "label": "643.782 USD",
          "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": [ ... ]
    }
  }
  "elements": [
    {
      "type": "hscatter",
      "values": [ ... ]
    }
  ]
}

共通の要素

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

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_axis」コンテンツ

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

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

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

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

 

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

「y_axis」コンテン

説明
colour
軸ラベルの色
#c7c7c7
grid-colour
y軸グリッドの色(垂直)
#c7c7c7
labels

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

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

例:

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

「要素」コンテンツ

列要素内の各オブジェクトは、1つのチャート要素を記述します。上の例で、hscatterタイプを持つRevenueテキストを持つ要素が1つしかなく、4つの値を持つ配列を含まれています。各値オブジェクトはx, y, ラベルツールチップコンテキストを構成されています。カラードットスタイルは要素に指定されています。

説明
type
チャートタイプ。水平散布チャートの場合は、値が「hscatter」としますhscatter
text
チャート名 
font-size
テキストを表示するために使用されるフォントのサイズ 
colour
表示テキストに使用されるカラー 
dot-style

ドットスタイル

説明
タイプ
 
ハロサイズ
 10
ドットサイズ
 6
 
values
説明
x
ドットのx位置を指定する数値1
y
ドットのy位置を指定する数値456.78
tip
マウスホバーで表示するツールチップのテキストこれは、ツールチップです
label
ドットの横に表示される値ラベル(任意)これはラベルです
context
定義されている場合、コンテキストがイベントパラメータとしてクライアントに送信されます 
 
Code Block
 "elements": [
    {
      "type": "hscatter",
      "text": "Revenue",
      "font-size": 10,
      "colour": "#4379bd",
      "dot-style": {
        "type": "solid-dot",
        "halo-size": 2,
        "dot-size": 2
      },
      "values": [
        {
          "x": 444835.123456789,
          "y": 0,
          "tip": "Austria\n444835.1",
          "label": "444.835 USD",
          "context": "{\"dataLink\":\"3_-2043221543\",\"identifierQuery\":\"[L_COUNTRY={Austria}]\"}"
        },
        {
          "x": 730974,
          "y": 1,
          "tip": "Canada\n730974",
          "label": "730.974 USD",
          "context": "{\"dataLink\":\"3_-1852385212\",\"identifierQuery\":\"[L_COUNTRY={Canada}]\"}"
        },
        {
          "x": 546650,
          "y": 2,
          "tip": "France\n546650",
          "label": "546.650 USD",
          "context": "{\"dataLink\":\"3_-1863819183\",\"identifierQuery\":\"[L_COUNTRY={France}]\"}"
        },
        {
          "x": 643782.34,
          "y": 3,
          "tip": "Germany\n643782.3",
          "label": "643.782 USD",
          "context": "{\"dataLink\":\"3_-547347785\",\"identifierQuery\":\"[L_COUNTRY={Germany}]\"}"
        }
      ]
    }
  ]

Attachments
uploadfalse
oldfalse
sortByname