zh:manual:api:reference:graph:update

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
zh:manual:api:reference:graph:update [2017/10/06 14:12]
127.0.0.1 external edit
zh:manual:api:reference:graph:update [2019/01/28 14:50] (current)
sasha <code js> => <code java>
Line 2: Line 2:
  
 ==== Description ==== ==== Description ====
 +==== 描述 ====
  
 ''​object graph.update(object/​array **graphs**)''​ ''​object graph.update(object/​array **graphs**)''​
 +''​对象 graph.update(object/​array **graphs**)''​
  
 This method allows to update existing graphs. This method allows to update existing graphs.
 +此方法用于更新已存在的图表。
  
 ==== Parameters ==== ==== Parameters ====
 +==== 参数 ====
  
 ''​(object/​array)''​ Graph properties to be updated. ''​(object/​array)''​ Graph properties to be updated.
 +''​(对象/​数组)''​ 要更新的图表属性.
  
 The ''​graphid''​ property must be defined for each graph, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged. The ''​graphid''​ property must be defined for each graph, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
 +每一个图表都必须定义''​graphid''​ 属性, 其它属性均为可选项. 只有被传递的属性会被更新,​ 其他属性将保持不变.
  
 Additionally to the [[object#​graph|standard graph properties]] the method accepts the following parameters. Additionally to the [[object#​graph|standard graph properties]] the method accepts the following parameters.
 +除了 [[object#​graph|标准图表属性]] 之外,此方法还接受以下参数.
  
 ^ Parameter ^ Type ^ Description ^ ^ Parameter ^ Type ^ Description ^
 | gitems | array | Graph items to replace existing graph items. If a graph item has the ''​gitemid''​ property defined it will be updated, otherwise a new graph item will be created. | | gitems | array | Graph items to replace existing graph items. If a graph item has the ''​gitemid''​ property defined it will be updated, otherwise a new graph item will be created. |
 +
 +^ 参数 ^ 类型 ^ 描述 ^
 +| gitems | array | 替换已存在图表监控项的图表监控项. 如果一个图表监控项的 ''​gitemid''​ 属性已经被定义,那么它将会被更新,​ 否则将会创建一个新的图表监控项. |
  
 ==== Return values ==== ==== Return values ====
 +==== 返回值 ====
  
 ''​(object)''​ Returns an object containing the IDs of the updated graphs under the ''​graphids''​ property. ''​(object)''​ Returns an object containing the IDs of the updated graphs under the ''​graphids''​ property.
 +''​(对象)''​ 在 ''​graphids''​ 属性下,返回一个包含已更新图表的ID的对象。
  
 ==== Examples ==== ==== Examples ====
 +==== 例子 ====
  
 === Setting the maximum for the Y scale === === Setting the maximum for the Y scale ===
 +=== 设置Y刻度的最大值 ===
  
 Set the the maximum of the Y scale to a fixed value of 100. Set the the maximum of the Y scale to a fixed value of 100.
 +设置Y刻度的最大值为固定值100.
  
 Request: Request:
-<​code ​js>+请求: 
 +<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 44: Line 60:
  
 Response: Response:
-<​code ​js>+响应: 
 +<​code ​java>
 { {
     "​jsonrpc":​ "​2.0",​     "​jsonrpc":​ "​2.0",​
Line 58: Line 75:
  
 ==== Source ==== ==== Source ====
 +==== 来源 ====
  
 CGraph::​update() in //​frontends/​php/​include/​classes/​api/​services/​CGraph.php//​. CGraph::​update() in //​frontends/​php/​include/​classes/​api/​services/​CGraph.php//​.