Submits a job to generate a dynamic chart video, such as a Line Chart, Pie Chart, or Bar Chart, from Excel data. You can customize chart elements like line colors and fonts.
Operation description
This operation generates a dynamic chart video from Excel data. This feature is available only in the Shanghai Region.
-
Customize text elements including the Chart Title, Subtitle, Data Source, and Unit. You can also specify the Font and Font Size. For supported fonts, see the Font List.
-
Supports five built-in styles: Normal, Mystery, Lively, Business, and Green.
-
Set a custom Background Color or Background Image.
-
Configure output video properties such as Video Duration, Dimensions, and Bitrate.
Examples:
-
Line Chart: Excel Sample, Result Sample.
-
Bar Chart: Excel Sample, Result Sample.
-
Pie Chart: Excel Sample, Result Sample.
-
Normal style: Result Sample.
-
Mystery style: Result Sample.
-
Lively style: Result Sample.
-
Business style: Result Sample.
-
Green style: Result Sample.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ChartType |
string |
Yes |
The chart type to generate. Valid values:
|
Line |
| Input |
string |
Yes |
The input data configuration, which specifies the Excel file location. |
{"XlsFile":"https://your-bucket.oss-cn-shanghai.aliyuncs.com/obj.xls"} |
| OutputConfig |
string |
Yes |
The output video configuration. |
{"MediaURL":"https://your-bucket.oss-cn-shanghai.aliyuncs.com/obj.mp4","Bitrate":2000,"Width":800,"Height":680} |
| ChartConfig |
string |
No |
The overall configuration for the chart's appearance and timing. |
{"Style":"Normal","TitleStartTime":"3000","ChartStartTime":"3000","VideoDuration":"15000"} |
| ChartTitle |
string |
No |
The chart title settings. |
{"Text":"Main Title","FontSize":"30","FontColor":"#000000","FontFile":"Microsoft YaHei"} |
| Subtitle |
string |
No |
The subtitle settings. |
{"Text":"Subtitle","FontSize":"30","FontColor":"#000000","FontFile":"Microsoft YaHei"} |
| Unit |
string |
No |
The data unit label settings. |
{"Text":"Unit","FontSize":"30","FontColor":"#000000","FontFile":"Microsoft YaHei"} |
| DataSource |
string |
No |
The data source label settings. |
{"Text":"Data fromSource","FontSize":"30","FontColor":"#000000","FontFile":"Microsoft YaHei"} |
| Background |
string |
No |
The settings for the chart background. You can specify a Background Color or a Background Image. |
{"Color":"#000000","ImageUrl":"http://your-bucket.oss-cn-shanghai.aliyuncs.com/obj.jpg"} |
| AxisParams |
string |
No |
The axis style settings. If |
{"FontFile":"Microsoft YaHei","XAxisFontSize":"30","YAxisFontSize":"30","XAxisFontInterval":"30","AxisColor":"30"} |
| Title |
string |
No |
The job title. |
Task Title |
| Description |
string |
No |
The job description. |
Task Description |
| UserData |
string |
No |
The custom user data in JSON format. |
{"user":"data"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
The Request ID. |
******11-DB8D-4A9A-875B-275798****** |
| JobId |
string |
The Job ID. |
****20b48fb04483915d4f2cd8ac**** |
After submitting the job, use the returned JobId to check its status by calling the Get Smart Task Result Interface. A successful job returns a response similar to the following example.
{
"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.