> Graph item object 图形项目对象

The following objects are directly related to the graphitem API.以下对象是graphitemAPI有直接关系

Graph item 图形项目

Graph items can only be modified via the graph API.图形项目只能通过graph API修改。

The graph item object has the following properties.图形项目对象拥有以下参数(属性)。

Property参数 Type类型 Description描述
图形项目ID gitemid string 字符串 (readonly只读) ID of the graph item.图形项目的ID。
颜色 color(required必要) string 字符串型 Graph item's draw color as a hexadecimal color code.绘制图形项目的颜色,使用十六进制码表示
监控项ID itemid(required必要) string 字符串型 ID of the item. 监控项的ID。
计算方式 calcfnc integer 整数型 Value of the item that will be displayed. 监控项的显示的值Possible values:可用值: 1 - minimum value最小值; 2 - (default默认) average value平均值; 4 - maximum value最大值; 7 - all values所有值; 9 - last value最后的值, used only by pie and exploded graphs.仅用于饼图和分散饼图
绘图线型 drawtype integer 整数型 Draw style of the graph item.绘制图形项目的线型 Possible values可用值: 0 - (default默认) line实线; 1 - filled region面积图(填满的区域); 2 - bold line粗实线; 3 - dot点; 4 - dashed line虚线; 5 - gradient line (梯度线).
图形ID graphid string 字符串 ID of the graph that the graph item belongs to.图形项目所属图形的ID
排序码 sortorder integer整数型 Position of the item in the graph.图形中项目的排序 Default: starts with 0 and increases by one with each entry. 默认从零开始,每增加一个加1.
类型 type integer整数型 Type of graph item.图形类型 Possible values可用值: 0 - (default默认) simple简单图形; 2 - graph sum汇总图形, used only by pie and exploded graphs.仅用于饼图和分散饼图
Y轴位置 yaxisside integer整数型 Side of the graph where the graph item's Y scale will be drawn.图形项目的Y轴画在图像的位置。 Possible values可用值: 0 - (default默认)_ left side左侧; 1 - right side右侧.