Generates animated charts based on Excel datasheets, such as line, pie, and bar charts. You can modify the line color and font.
Operation description
This feature is available only in the China (Shanghai) region.
- You can add a title, subtitle, data source, and unit to a chart and specify the font and font size. For supported fonts, see Fonts .
- This feature provides five styles of animated charts: normal, mystery, lively, business, and green.
- You can set the background color or image.
- You can set the animation duration, size, and bitrate.
Examples
- Line chart: Sample datasheet, Effect
- Bar chart: Sample datasheet, Effect
- Pie chart: Sample datasheet, Effect
- Normal: Effect
- Mystery: Effect
- Lively: Effect
- Business: Effect
- Green: Effect
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| ice:SubmitDynamicChartJob | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ChartType | string | Yes | The chart type. Valid values:
| Line |
| Input | string | Yes | The input data for the chart. | {"XlsFile":"https://your-bucket.oss-cn-shanghai.aliyuncs.com/obj.xls"} |
| OutputConfig | string | Yes | The output configurations. | {"MediaURL":"https://your-bucket.oss-cn-shanghai.aliyuncs.com/obj.mp4","Bitrate":2000,"Width":800,"Height":680} |
| ChartConfig | string | No | The chart configurations. | {"Style":"Normal","TitleStartTime":"3000","ChartStartTime":"3000","VideoDuration":"15000"} |
| ChartTitle | string | No | The chart title. | |
| Subtitle | string | No | The subtitle. | |
| Unit | string | No | Unit | |
| DataSource | string | No | The data source. | |
| Background | string | No | The chart background. | {"Color":"#000000","ImageUrl":"http://your-bucket.oss-cn-shanghai.aliyuncs.com/obj.jpg"} |
| AxisParams | string | No | The axis configurations. If XAxisFontInterval is set to 0 or left empty, the system automatically determines an optimal interval. | {"FontFile":"Microsoft YaHei","XAxisFontSize":"30","YAxisFontSize":"30","XAxisFontInterval":"30","AxisColor":"30"} |
| Title | string | No | The job title. | |
| Description | string | No | The job description. | |
| UserData | string | No | The custom data in JSON format. | {"user":"data"} |
Response parameters
You can call the GetSmartHandleJob operation to query the execution details of an animated chart job based on the job ID. The following example shows the response returned by the GetSmartHandleJob operation for a successful job.
{
"RequestId": "******2D-443C-5043-B0E4-867070******",
"JobResult": {
"MediaId": "******bf47c94e82b3b2014361******"
},
"State": "Finished",
"JobId": "******042d5e4db6866f6289d1******",
"SmartJobInfo": {
"JobType": "DynamicChart",
"ModifiedTime": "2022-01-21T07:02:02Z",
"UserId": 1234562230123456,
"CreateTime": "2022-01-21T07:02:02Z",
"Title": "Sample chart 1",
"EditingConfig": "null"
}
}
Examples
Sample success responses
JSONformat
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"JobId": "****20b48fb04483915d4f2cd8ac****"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2021-12-21 | Add Operation | View Change Details |
