[comment]: # translation:outdated

[comment]: # ({bf6ab874-fb4eeabf})
# 5 常用图表

[comment]: # ({/bf6ab874-fb4eeabf})

[comment]: # ({6352d862-40650cb4})
### 说明

各个仪表盘组件字段对象中的这些参数和可用属性值允许在`dashboard.create` 和 `dashboard.update` 方法中配置[*常用图表*](/manual/web_interface/frontend_sections/dashboards/widgets/favorite_graphs)组件。

[comment]: # ({/6352d862-40650cb4})

[comment]: # ({974460e7-8dfaf481})
### 参数

*常用图表*组件支持以下参数：

|参数|[类型](/manual/api/reference/dashboard/object#仪表盘组件字段)|参数名称|参数值或参数说明|
|-----|-|-----|-------------------|
|*刷新频率*|0|rf_rate|0 - 不刷新；<br>10 - 10 秒；<br>30 - 30 秒；<br>60 - 1 分钟；<br>120 - 2 分钟；<br>600 - 10 分钟；<br>900 - *(默认)* 15 分钟。|

[comment]: # ({/974460e7-8dfaf481})

[comment]: # ({42f6967e-5ce1276c})
### 示例

以下示例仅用于介绍如何在仪表盘组件字段对象中配置*常用图表*组件。
更多信息，请参考[创建仪表盘](/manual/api/reference/dashboard/create)。

[comment]: # ({/42f6967e-5ce1276c})

[comment]: # ({73e496b5-80db0acb})
#### 配置一个*常用图表*组件

配置一个*常用图表*组件，并设置刷新频率为 10 分钟。

[请求](/manual/api#执行请求):

```json
{
    "jsonrpc": "2.0",
    "method": "dashboard.create",
    "params": {
        "name": "My dashboard",
        "display_period": 30,
        "auto_start": 1,
        "pages": [
            {
                "widgets": [
                    {
                        "type": "favgraphs",
                        "name": "Favorite graphs",
                        "x": 0,
                        "y": 0,
                        "width": 12,
                        "height": 3,
                        "view_mode": 0,
                        "fields": [
                            {
                                "type": 0,
                                "name": "rf_rate",
                                "value": 600
                            }
                        ]
                    }
                ]
            }
        ],
        "userGroups": [
            {
                "usrgrpid": 7,
                "permission": 2
            }
        ],
        "users": [
            {
                "userid": 1,
                "permission": 3
            }
        ]
    },
    "id": 1
}
```

响应：

```json
{
    "jsonrpc": "2.0",
    "result": {
        "dashboardids": [
            "3"
        ]
    },
    "id": 1
}
```

[comment]: # ({/73e496b5-80db0acb})

[comment]: # ({e9d30322-24a59ae7})
### 参考

-   [仪表盘组件字段](/manual/api/reference/dashboard/object#仪表盘组件字段)
-   [创建仪表盘](/manual/api/reference/dashboard/create)
-   [更新仪表盘](/manual/api/reference/dashboard/update)

[comment]: # ({/e9d30322-24a59ae7})
