[comment]: # translation:outdated

[comment]: # ({a23a9b82-a23a9b82})
# graphprototype.update

[comment]: # ({/a23a9b82-a23a9b82})

[comment]: # ({5ac42d98-5ac42d98})
### Leírás

`objektum graphprototype.update(object/array graphPrototypes)`

Ez a módszer lehetővé teszi a meglévő gráf prototípusok frissítését.

::: noteclassic
Ez a módszer csak az *Admin* és a *Kiemelt rendszergazda* számára érhető el
felhasználói típusok. A metódus meghívására vonatkozó engedélyek felhasználói szerepkörben visszavonhatók
beállítások. Lásd: [User
roles](/manual/web_interface/frontend_sections/administration/user_roles)
további információért.
:::

[comment]: # ({/5ac42d98-5ac42d98})

[comment]: # ({new-c4171dc6})
### Parameters

`(object/array)` Graph prototype properties to be updated.

The `graphid` property must be defined for each graph prototype, all
other properties are optional. Only the passed properties will be
updated, all others will remain unchanged.

Additionally to the [standard graph prototype
properties](object#graph_prototype), the method accepts the following
parameters.

|Parameter|[Type](/manual/api/reference_commentary#data_types)|Description|
|--|--|------|
|gitems|array|Graph [items](/manual/api/reference/graphitem/object) 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.|

[comment]: # ({/new-c4171dc6})

[comment]: # ({8d626778-8d626778})
### Visszatérési értékek

`(object)` A frissített gráf azonosítóit tartalmazó objektumot ad eredményül
prototípusok a "graphids" tulajdonság alatt.

[comment]: # ({/8d626778-8d626778})

[comment]: # ({b41637d2-b41637d2})
### Példák

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({new-c044eff0})
#### Changing the size of a graph prototype

Change the size of a graph prototype to 1100 to 400 pixels.

Request:

```json
{
    "jsonrpc": "2.0",
    "method": "graphprototype.update",
    "params": {
        "graphid": "439",
        "width": 1100,
        "height": 400
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "graphids": [
            "439"
        ]
    },
    "id": 1
}
```

[comment]: # ({/new-c044eff0})

[comment]: # ({743007eb-743007eb})
### Forrás

CGraphPrototype::update() in
*ui/include/classes/api/services/CGraphPrototype.php*.

[comment]: # ({/743007eb-743007eb})
