All Products
Search
Document Center

Quick BI:Insert ECharts Code

Last Updated:Jun 03, 2026

Online editing mode lets you develop and debug custom components directly on the page. Use the Insert ECharts Code function to embed any chart from the official ECharts example library into your component in minutes.

Step 1: Enter online editing

Create a custom component and enter editing mode. For details, see Debug components.

image.png

Configure field information and retrieve the data.

image.png

Step 2: Get ECharts example code

Go to the ECharts examples page and select a sample chart.

image.png

Open the chart's detail page. On the Code Editor tab, select JS, then select and copy all the code on the left to get the option configuration.

image.png

Insert ECharts Code works by injecting an ECharts option configuration variable into your component. Make sure the code you copy includes the option = {...} variable. Most examples on the official ECharts website include it. If an example uses a non-standard structure, copy only the option = {...} variable and discard the rest.

Step 3: Generate code

1. Add dependencies

Click Add Third-party Library.

image.png

Select ECharts.

image.png

Quick BI includes ECharts v5.4.0 by default. To use a different version, enter a CDN URL or upload a JS library file.

image.png

2. Insert ECharts code

Click Insert ECharts Code.

image.png

Paste the option code copied in Step 2 into the input box and click OK.

image.png

Click Run to preview the ECharts chart.

image.png

Next steps

The chart now renders using static data from the ECharts example. To connect it to your dataset, use the custom component API to convert the Quick BI data format to the ECharts data format. For a complete walkthrough, see Complete example: Develop an ECharts chart.