SubmitDynamicChartJob
Generates videos of line charts, pie charts, and bar charts based on Excel data, and supports modifying line colors, fonts, and other settings.
Operation description
Generates chart videos based on Excel data. Line charts, bar charts, and pie charts are supported. This feature is available only in the China (Shanghai) region.
Supports setting text such as the chart title, subtitle, data source, and unit, and allows you to set the font and font size of the text. For supported fonts, see Font list.
Supports five built-in styles. Valid values: Normal, Mystery, Lively, Business, and Green.
Supports setting the background color and background image.
Supports setting the video duration, dimensions, and bitrate.
Examples:
Line chart: Excel sample, Generated video.
Bar chart: Excel sample, Generated video.
Pie chart: Excel sample, Generated video.
Normal style: Generated video.
Mystery style: Generated video.
Lively style: Generated video.
Business style: Generated video.
Green style: Generated video.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitDynamicChartJob |
create |
*All Resource
|
None | 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 settings. |
{"MediaURL":"https://your-bucket.oss-cn-shanghai.aliyuncs.com/obj.mp4","Bitrate":2000,"Width":800,"Height":680} |
| ChartConfig |
string |
No |
The chart configuration. |
{"Style":"Normal","TitleStartTime":"3000","ChartStartTime":"3000","VideoDuration":"15000"} |
| ChartTitle |
string |
No |
The main title. |
{"Text":"ChartTitle","FontSize":"30","FontColor":"#000000","FontFile":"Microsoft YaHei"} |
| Subtitle |
string |
No |
The subtitle. |
{"Text":"Subtitle","FontSize":"30","FontColor":"#000000","FontFile":"Microsoft YaHei"} |
| Unit |
string |
No |
The unit. |
{"Text":"Unit","FontSize":"30","FontColor":"#000000","FontFile":"Microsoft YaHei"} |
| DataSource |
string |
No |
The data source. |
{"Text":"DataSource","FontSize":"30","FontColor":"#000000","FontFile":"Microsoft YaHei"} |
| Background |
string |
No |
The chart background. |
{"Color":"#000000","ImageUrl":"http://your-bucket.oss-cn-shanghai.aliyuncs.com/obj.jpg"} |
| AxisParams |
string |
No |
The axis style. If XAxisFontInterval is not specified or is set to 0, the algorithm automatically calculates the interval. |
{"FontFile":"Microsoft YaHei","XAxisFontSize":"30","YAxisFontSize":"30","XAxisFontInterval":"30","AxisColor":"30"} |
| Title |
string |
No |
The task title. |
Job Title |
| Description |
string |
No |
The task description. |
Job Description |
| UserData |
string |
No |
The custom data in JSON format. |
{"user":"data"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
******11-DB8D-4A9A-875B-275798****** |
| JobId |
string |
The task ID. |
****20b48fb04483915d4f2cd8ac**** |
You can use the JobId of a dynamic chart node to query the task result and node execution details by calling the GetSmartJobResult operation. The following example shows the response returned by the GetSmartJobResult operation when the node is successfully executed.
{
"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": "Dynamic chart use case 1",
"EditingConfig": "null"
}
}
Examples
Success response
JSON format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"JobId": "****20b48fb04483915d4f2cd8ac****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.