> Graph object

> 图表对象

The following objects are directly related to the graph API. 以下对象与 图表 API直接相关。

Graph

图表

The graph object has the following properties. 图表对象具有以下属性:

PropertyTypeDescription
graphidstring(readonly) ID of the graph.
height
(required)
integerHeight of the graph in pixels.
name
(required)
stringName of the graph
width
(required)
integerWidth of the graph in pixels.
flagsinteger(readonly) Origin of the graph.

Possible values are:
0 - (default) a plain graph;
4 - a discovered graph.
graphtypeintegerGraph’s layout type.

Possible values:
0 - (default) normal;
1 - stacked;
2 - pie;
3 - exploded.
percent_leftfloatLeft percentile.

Default: 0.
percent_rightfloatRight percentile.

Default: 0.
show_3dintegerWhether to show pie and exploded graphs in 3D.

Possible values:
0 - (default) show in 2D;
1 - show in 3D.
show_legendintegerWhether to show the legend on the graph.

Possible values:
0 - hide;
1 - (default) show.
show_work_periodintegerWhether to show the working time on the graph.

Possible values:
0 - hide;
1 - (default) show.
templateidstring(readonly) ID of the parent template graph.
yaxismaxfloatThe fixed maximum value for the Y axis.

Default: 100.
yaxisminfloatThe fixed minimum value for the Y axis.

Default: 0.
ymax_itemidstringID of the item that is used as the maximum value for the Y axis.
ymax_typeintegerMaximum value calculation method for the Y axis.

Possible values:
0 - (default) calculated;
1 - fixed;
2 - item.
ymin_itemidstringID of the item that is used as the minimum value for the Y axis.
ymin_typeintegerMinimum value calculation method for the Y axis.

Possible values:
0 - (default) calculated;
1 - fixed;
2 - item.
属性 类描述
graphidstring(只读) 图表的ID.
height
(必选)
integer图表的高度(单位:像素).
name
(必选)
string图表的名称
width
(必选)
integer图表的宽度(单位:像素).
flagsinteger(readonly) 图表的来源.

可用值:
0 - (默认) 简单的图表;
4 - 发现的图表.
graphtypeinteger图表的类型.

可能值:
0 - (默认) 常规;
1 - 堆积图;
2 - 饼图;
3 - 分散饼图.
percent_leftfloat百分比线(左).

默认: 0.
percent_rightfloat百分比线(右).

默认: 0.
show_3dinteger是否以3D形式展示饼图和分散饼图.

可用值:
0 - (默认) 以2D展示;
1 - 以3D展示.
show_legendinteger是否在图表上显示图例.

可用值:
0 - 隐藏;
1 - (默认) 显示.
show_work_periodinteger是否在图表上显示工作时间.

可用值:
0 - 隐藏;
1 - (默认) 显示.
templateidstring(只读) 父模板图表的ID.
yaxismaxfloatY轴的固定最大值.

默认: 100.
yaxisminfloatY轴的固定最小值.

默认: 0.
ymax_itemidstring用于作为Y轴最大值的监控项ID.
ymax_typeintegerY轴最大值的计算方式.

可用值:
0 - (默认) 可计算的;
1 - 固定的;
2 - 监控项.
ymin_itemidstring用于作为Y轴最小值的监控项ID.
ymin_typeintegerY轴最小值的计算方式.

可用值:
0 - (默认) 可计算的;
1 - 固定的;
2 - 监控项.