How do I find template widgets?

In the command-line interface (CLI), install datav-cli and run the datav init command to download and install template widgets. For more information, see Quick start.

Why did I fail to publish my widgets?

Widgets may fail to publish due to one of the following reasons:

  • The names of the widgets are not in a valid format.

    The component name (name field in the package.json) cannot be published without the component package name. The correct component name format is @namespace/xxx (@ component package English name /component name).

  • Widgets are still under review or failed to pass the review.

    If your widget has not passed the review for a long time, contact Alibaba Cloud technical support.

How do I write a data event that triggers other widgets to monitor the data of a specific widget?

  1. Define events in a valid format under the datav field in the package.json file.
  2. In the index.js file, use the this.emit(event_name,value) method to pass the event name and parameters.
    Note The value parameter must be an object instead of a basic type value.
  3. Use :xxx to call the data of this parameter for other widgets. xxx indicates the name of this parameter.

How do I encapsulate an ECharts widget?

For more information, see Guide to ECharts widget encapsulation.

Why did local images fail to upload?

If you want to upload resources, such as a local static file, you must create the resources folder in the widget root directory, place resources, such as images, into the directory, and then call the directory, such as ./resources/xxx.png.

Why did my program report that packages cannot be found?

If you continue to receive an error that indicates that packages cannot be found after you run the npm install command, remove the datav-cli tool and reinstall it.

My widgets have not passed the review for a long time. Why?

If your widgets have not passed the review for a long time, contact Alibaba Cloud technical support.

Why do I suddenly have no permissions to publish widgets?

If you use the DataV trial edition and do not upload widgets or tutorials within two months, your permissions are revoked. Apply for the permissions again or contact Alibaba Cloud technical support.

My widgets work properly in offline mode but cannot work in DataV. Why?

This may be caused by one of the following reasons:

  • data cannot be set to null for widgets.
  • jQuery is modified in the widget code, for example, jQuery is reassigned a value.
  • The window object is modified in the widget code.
  • If several widgets are added and the new configurations do not take effect, you must check whether your widget code contains a CSS file.
  • The document object model (DOM) model is modified outside of the container.
  • If you use jQuery to access the DOM model, the $(‘.classname’) operation is not allowed. Instead, you must search for DOM nodes in the container.

How do I find my widgets on the editor page?

You can click the Widgets icon in the top navigation bar to view your widgets.

Why am I unable to find the widgets I purchased?

Categories of widgets are not correctly configured. For more information, see Specifications of a package.json file.