Quick start

Updated at:

In Quick BI, in addition to the built-in chart components, you can develop custom components for personal or organizational use.

Before you begin, we recommend learning ES2015. This guide assumes you have an intermediate knowledge of HTML, CSS, and JavaScript. If you are new to front-end development, using Quick BI custom components as your first step is not recommended. Custom components can be developed in two modes: online editing and professional mode, which are described in the following sections.

Mode 1: Online editing

Quick BI supports an online editing mode that lets you develop and debug custom components directly in your web browser. This method does not require a local development environment, offering a simpler and more convenient workflow. To begin, log in to Quick BI with an organization administrator account.

Note

Only organization administrators can access the custom component management platform.

1. Register a component

First, register a custom component.

  1. Go to Open Platform > Custom Components > Register Component. For Development Mode, select Online Editing, fill in the required information, and click Confirm.image

    Note

    You can choose between online editing mode and professional mode based on your needs.

    For more information, see Mode 1: online editing and Mode 2: professional mode.

  2. In the Register Component dialog box, configure the following parameters.

    Parameters

    Parameter

    Description

    Component name

    Enter a name for your component.

    Icon

    Upload an image from your local computer as the component's icon.

    Note
    • The image resolution must be at least 60×60 pixels and must not exceed 180×60 pixels.

    • The image size must not exceed 100 KB.

    Component type

    Supported types include chart, chart card menu, and spreadsheet menu.

    Scope

    The locations where the component can be used. Chart-type components can be added to a dashboard, data visualization screen, or spreadsheet.

    Development mode

    • Online Editing: Develop and debug within the web page. This method is simpler and more convenient.

    • Professional Mode: Use the SDK for local debugging. This method is suitable for developing complex components.

    Debugging url

    The URL for debugging the custom component.

    Note

    This parameter is required only for professional mode.

    Platform

    The platforms where the custom component can be used. Supported platforms include PC and mobile.

    Enable Shadow DOM

    If enabled, Shadow DOM encapsulates the component's DOM.

    Default width & height

    The default width and height for the custom component.

    Third-party libraries

    Optional. The CDN URLs for third-party libraries to improve component performance.

    Remarks

    Add remarks for the custom component.

  3. Click Confirm.

    Your newly registered component appears on the component management page.

    image

  4. Add a demo component.

    You can also directly click "Add Demo Component" to quickly create a custom component.

    image

    The demo custom component is pre-configured with the following settings:

    image

    This demo component is a rounded doughnut chart built with ECharts by using the online editing mode. Quick BI pre-configures all the necessary code when you add the component. It appears as shown below:

    image

    You can use this demo component as is, or modify it to create a new component to meet your requirements.

2. Debug the component

After registering the component, click the Debug Component icon on the component's card to start debugging.

image

In the dialog box that appears, select the Debugging Scope and Workspace, choose the target dashboard, and then click Go to Debug.

image.png

In the dashboard editor that opens, you can start developing your custom component.

image.png

The following image shows the chart after debugging:

image..png

Mode 2: Professional mode

In this mode, you develop and debug custom components in a local environment. This method requires setting up your local machine and is suitable for creating complex components.

1. Set up the environment

Before you start, install the following software:

  1. node.js

    Go to the official Node.js website to download and install the Node.js environment. We recommend installing Node.js 22. After installation, run the following command to verify the installation.

    node -v
  2. git

    Go to the official Git website to download and install Git. After installation, run the following command to verify the installation.

    git --version
  3. (Optional) package manager

    You can use npm, the default package manager included with Node.js. However, we recommend using a modern, high-performance package manager like pnpm to install dependencies.

    1. pnpm

      Run the following command to install pnpm:

      npm install -g pnpm

      The default pnpm registry may be slow in some regions. To improve download speed, consider using a mirror:

      pnpm config set registry https://registry.npmmirror.com/
    2. yarn

      You can also use yarn as your package manager. Run the following command to install it:

      npm i -g yarn

      The default yarn registry may be slow in some regions. To improve download speed, consider using a mirror:

      yarn config set registry https://registry.npmmirror.com/
  4. vscode

    We recommend using Visual Studio Code as your IDE. The Quick BI seed project uses TypeScript, and VS Code provides an excellent development experience for TypeScript.

2. Create a development project

  1. Open a terminal or PowerShell and navigate to the folder where you want to create your project.

  2. Run the following command to create the project:

    npm init qbi-app@latest my-app

    The command prompts you to select a template type. The options correspond to a custom component, a custom chart card menu, a custom dashboard menu, and a custom spreadsheet menu.

    image.png

    After selecting the Custom Chart component type, you will be prompted to choose a framework. Vanilla indicates that the template is framework-agnostic.

    image.png

    Select your preferred option and press Enter. The following screen confirms that the template was created successfully.

    image.png

  3. Change to the project directory and install the dependencies.

    cd my-app
    pnpm install
  4. Start the local server.

    pnpm run start

    When the server starts successfully, the following page is displayed. You can now proceed to debug the component in a Quick BI dashboard.image The first time you debug, you may need to click through a browser security warning, as shown in the image below.

    Note

    Keep the local server running while debugging.

3. Debug the component

  1. Register the component

    First, register a custom component.

    Go to Open Platform > Custom Components > Register Component. For Development Mode, select Professional Mode, fill in the required information, and click Confirm.

    image

    Note

    Third-party libraries: This field is optional. You can leave it blank if your component does not have performance issues.

  2. Debug the component

    Click the Debug Component icon on the component card.

    image

    In the dialog box that appears, select the Debugging Scope and Workspace, choose the target dashboard, and click Go to Debug.

    image.png

    In the dashboard editor that opens, click Add Chart > Custom. Your new custom component appears in the list.

    image.png

    Now you can develop and debug the custom component as needed.