Skip to main content

EChart

Container properties

All component configurations support Container properties at the first level.

Component properties

NameTypeDefaultSupports Variable PatternDescription
classNamestring✔️The className of the component
styleobjectThe style of the component
category'axis' | 'pie' | 'generic'axis - Axis coordinate system
pie - Pie chart without coordinate system
generic - The results obtained from the data source are directly rendered as echart option. At this time, the chartSettings / series / echartOption configuration is invalid
chartSettingsobjectcategory=axis - with horizontal and vertical axis fields
category=pie - with legend/value fields
echartOptionobjectechart option settings
seriesobjectechart's series settings
dataSource{ token: string, pbcToken: string, listUrl: string }data source
dataUrlConditionalListOrSinglePropertyPropType(string)Get data via dataUrl.
dataFiltersConditionalListPropertyPropType(DataFilters)✔️Fixed filter conditions hidden by requesting data source cannot be changed through the interface
sortModelArray<SortModel>How to sort data
dataResponseKeyPathstring'results'Take a certain subdata in response data as the result.
transformDataResponsestringConvert the retrieved data, use the eval expression, this points to the retrieved data.
translateDataResponsebooltrueIs the translation request result required
debounceTimenumber200The debounce time of requesting data will trigger leadership.
defaultValueobjectThe default data of the data source will be merged with the data requested by the API. If the api request returns an array, merge each item of the array. If the API request returns an object, merge with this object.
httpMethod'get' | 'post''post'http method for data request. have
selectColIdArray<string>Loaded data fields, all fields will be loaded without configuration.

All the remaining componentsProps will be passed to the component root element (div).

SortModel

NameTypeDefaultDescription
colIdstringSort field id
sort'asc' | 'desc''asc'Order in descending order
sortType'text' | 'number' | 'date''text'What type of values are sorted

JS API

The interface obtained through formApi.getFieldApi() is as follows:

NameTypeDescription
nodeHTML ElementThe root DOM element of the component
chartobjectEChart instance,Official documentation