SubmitDynamicChartJob

Updated at:

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:

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 :

    Line

  • Histogram :

    Histogram

  • Pie :

    Pie

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.