Quick BI provides a set of APIs for building and configuring custom components on dashboards and data screens.
Lifecycle
A custom component is essentially a lifecycle object. For more information, see Lifecycle.
LifecycleProps
LifecycleProps defines the type of the props parameter passed to each lifecycle method of a custom component. It includes the container and customProps properties:
interface LifecycleProps {
container?: HTMLElement;
customProps?: ComponentProps;
}
For example:
class MyComponent {
mount(props: LifecycleProps) {...}// props is of type LifecycleProps
update(props: LifecycleProps) {...}
unmount(props: LifecycleProps) {...}
}
const MyReactComponent: React.FC<LifecycleProps> = (props) => <div>...<div/> // props is of type LifecycleProps
-
container
props.containeris adiv DOMelement on a Quick BI dashboard that hosts the custom component. IfShadow DOMis enabled, the parent element ofprops.containerbecomes aShadowRootelement. -
customProps
props.customPropscontains runtime information about the custom component:interface ComponentProps { viewConfig: ComponentPropsViewConfig; dataConfig: AreaModel[]; advancedConfig: object; globalConfig?: ComponentPropsGlobalConfig; data: DataCell[][]; dispatch?: ComponentPropsDispatch; cubeConfig?: ComponentPropsCubeConfig[]; sql?: string[]; } -
customProps.data
The data for the custom chart, which is a two-dimensional array.
interface DataCell { fieldId: string; originValue: string; value: string; geoInfo?: object; }-
fieldId: The ID of the data field. It corresponds to the ID incustomProps.dataConfig. -
originValue: The original value of the data. -
value: The display value of the data. -
geoInfo: The geographical information of the dimension field.
-
-
customProps.dataConfig
Configuration for the data fields from the custom chart's Data panel.
interface AreaModel { areaType: 'row' | 'column' | 'drill' | 'filter'; fields: FieldModel[]; }-
areaType: The field type, which can have the following values.-
row: A dimension field. -
column: A measure type field. -
drill: The drill-down type field. -
filter: The filter type field.
-
-
fields: An array of fields. A single field type can have multiple fields. The interface is as follows:interface FieldModel { /** A unique ID for the field. */ fieldId: string; /** The field name. */ fieldName: string; /** The display alias. */ showName: string; /** Specifies whether the field is a calculated field. */ isCalc?: boolean; skin?: string; /** The value type. */ valueType?: FieldValueType; /** The field type: dimension or measure. */ fieldType: FieldCommonType; /** The aggregation method. */ aggregation?: FieldAggregation | string; /** [Quick BI-specific] The data rendering format. Currently, imageUrl is used for image rendering in crosstabs and leaderboards. */ displayType?: 'imageUrl' | ''; /** [Quick BI-specific] The dataset format configuration, such as #,##0.00%. */ rawFormat?: string; /** [Quick BI-specific] The dataset dimension type, TimeRegionInBackend. */ dimGranularity?: any; /** The final format configuration. (Note: In Quick BI, this is currently placed in styleConfig, and this field is not used.) */ format?: QbiFormatModel | FbiFormatModel; /** The sort order. */ order?: FieldOrder; /** Advanced calculations, such as year-over-year or month-over-month. */ advancedCalculation?: 'year-to-year' | 'month-to-year'; /** The set of filter conditions for the current chart. */ complexFilter: { limitNum: number; filter: any; }; // The true unique identifier for the field. uuid: string; /** Extended information for fields, specific to certain chart types. */ extends?: FieldModelExtends; }
-
-
customProps.viewConfig
Configuration data from the custom chart's style panel.
interface ComponentPropsViewConfig { caption?: string; chartColorSeries?: { key: string; name: string; colors: string[]; }; chartSkin?: { key: 'black' | 'default'; }; title?: { show: boolean; viceName?: string; color?: string; showLink?: boolean; link?: string; linkName?: string; }; fieldSettingMap?: { [fieldId: string]: ComponentPropsFieldSettingConfig }; width?: number; height?: number; [key: string]: any; }-
caption: The main title of the component. -
title: The title of the component.-
title.show: Specifies whether to display the main title and subtitle. -
title.viceName: The subtitle. -
title.color: The color of the main title. -
title.showLink: Specifies whether to display the title as a hyperlink. -
title.link: The redirect URL. -
title.linkName: The text of the link.
-
-
chartColorSeries: The dashboard color scheme.-
chartColorSeries.key: The key of the color scheme. -
chartColorSeries.name: The name of the color scheme. -
chartColorSeries.colors: The colors of the color scheme. A total of 10 colors are available.
-
-
chartSkin: The dashboard skin.chartSkin.key: The dashboard skin key.-
defaultrepresents the light version. -
blackrepresents the dark theme.
-
-
The
fieldSettingMapfield stores display settings, such as field aliases and data display formats. The interface is as follows:interface ComponentPropsFieldSettingConfig { aliasName: string; numberFormat: NumberFormat; [key: string]: any; }-
fieldSettingMap.aliasName: The display alias for the field. -
fieldSettingMap.numberFormat: The data display format for the field.
-
-
height: The custom height of the chart. -
widith: The custom width of the chart. -
In addition to the properties mentioned above, custom properties also include the form values in
viewConfigthat are generated by thestyleSchemaconfiguration defined inmeta.js.
For example:
// meta.js const componentMeta = { // ... propsSchema: { styleSchema: { schema: { type: 'object', properties: { display: { type: 'object', title: t('Display Settings'), properties: { // ... startAngle: { title: t('Start Angle'), id: 'startAngle', type: 'number', defaultValue: 0, }, }, }, }, }, }, } } props.customProps.viewConfig.startAngle // 0 -
-
customProps.globalConfig
Global configuration data for the custom chart. This feature is under development.
-
customProps.dispatch
A function to modify properties or trigger actions on the custom chart.
(param: { type: 'select' | 'changeViewConfig' | 'cancelDrill' | 'cancelLinkage' payload: any }) => voidparam: The behavior type parameter.param.typehas the following types:-
select: Refers to operations on custom charts, such as drill-down, linkage, navigation, and combined linkage and drill-down. When called, the operation triggers a data retrieval request and updates the chart.In this case, the type of
payloadispayload: { dataIndex: number }, wheredataIndexis the array index of the dimension to drill down into in thecustomProps.dataarray. -
cancelDrill: Cancels the drill-down operation on a custom chart. Calling the function triggers a data retrieval request and updates the chart.In this case, you do not need to pass
payload. -
cancelLinkage: Cancels the linkage for a custom chart. When called, this operation triggers a data retrieval request and updates the chart.In this case, you do not need to provide the
payload. -
changeViewConfig: Modifies the custom chart. You can call this function to modify the data in the style panel and update the chart.In this case, the
payloadis of the typepayload: { [key: string]: any }, and the properties to be updated are passed to thepayloadaskey-valuepairs.
For example:
props.customProps.dispatch({ type: 'select', payload: { dataIndex: 1 } }) props.customProps.dispatch({ type: 'cancelDrill' }) props.customProps.dispatch({ type: 'cancelLinkage' }) props.customProps.dispatch({ type: 'changeViewConfig', payload: { caption: 'New Title' } }) -
-
customProps.advancedConfig
Configuration for the custom chart's Advanced panel. This feature is under development.
-
customProps.cubeConfig
The dataset configuration for the custom chart, provided as an array of objects.
interface ComponentPropsCubeConfig { /** The dataset ID. */ cubeId: string; /** The dataset name. */ cubeName: string; } -
customProps.sql
The query SQL for the custom chart, provided as an array of strings.
-
customProps.pageConfig
Information about the current host page.
interface CommonPageConfig {
/** The workspace ID of the page. */
workspaceId: string;
/** The page ID. */
id: string;
/** The current device. */
device: 'pc' | 'mobile';
/** The current visitor's ID. */
userId: string;
/** The current visitor's account name. */
userName: string;
/** The current visitor's nickname. */
nickName?: string;
/** The page creator's ID. */
ownerUserId: string;
/** The page creator's username. */
ownerUserName: string;
/** The page title. */
title: string;
/** The page route key. */
routeKey?: RouteKey;
}
The following table lists the available route keys and their corresponding pages.
|
Name |
Route key |
Example |
|
Dashboard Edit page (host page) |
dashboardEdit |
|
|
Dashboard Preview page (host page) |
dashboardView |
|
|
Data Screen Edit page (host page) |
screenEdit |
|
|
Data Screen Preview page (host page) |
screenView |
|
|
Custom Component Management page |
customComponent |
|
ComponentMeta
Component metadata describes the configuration of the style, data, and advanced panels:
interface ComponentMeta {
propsSchema: {
dataSchema?: DataSchema;
styleSchema?: StyleSchema;
advancedSchema?: StyleSchema;
};
}
-
propsSchema.styleSchema
Defines the JSON schema for a custom component's style panel form.
interface StyleSchema { schema: StyleSchemaBase; localEditors?: { [key: string]: React.ComponentType<any>; }; validation?: StyleSchemaValidation; }For example:
// Configured in meta.js "myData": { "title": "someTitle", "type": "number", }A number input box appears in the style panel.
If you enter 123 into the input box, the output will be:{ "myData": 123 }-
schema: Defines the editor and form configurations.interface StyleSchemaBase<P = any, T = string> { type: T; title?: string; titleAlign?: 'left' | 'center' | 'right'; properties?: StyleSchemaProperties; className?: string; description?: string; propertyOrder?: number; id?: StyleSchemaDependId; hide?: boolean; visibleDepends?: StyleSchemaDepend[]; disabled?: boolean; disableDepends?: StyleSchemaDepend[]; hideIfDisable?: boolean; validation?: StyleSchemaValidationRule[]; showRequiredMark?: boolean; hideValidateTips?: boolean; defaultValue?: any; props?: P; redirect?: string; relatedToData?: boolean; suffix?: string; grid?: { row: number; col: number }; } -
schema.type: The editor type.arrayandobjectare logical editors; the others are basic editors. The following table lists the supportedtypevalues.Editor type
Preview
Editor property
Type
Default
Description
object

mode
'tabs' | 'collapse'
None
The group type. Supports
tabsandcollapsemodes.array

-
-
None
An array type that lets you add or remove multiple editor instances.
number

max
number
None
Maximum value.
min
number
None
Minimum value.
changeOnBlur
boolean
None
If true, triggers the
changeevent only on blur.string

maxLength
number
None
Maximum length.
placeholder
string
""
The placeholder text.
info
string
None
Tooltip text.
debounceTime
number
0
Delay for the
changeevent in milliseconds.textArea
boolean
false
If true, renders the input as a multi-line textarea.
select

suffix
string
None
Suffix. For example, Quantity: drop-down list items
multiple
boolean
None
If true, allows selecting multiple options.
style
object
{ width: '100%' }
A CSS style object for the control.
options
{ label: string; value: string | number;}[]
[]
An array of options for the dropdown menu.
switch

size
'default' | 'small''small'
The size of the switch control.
loading
boolean
false
If true, sets the switch to a loading state.
info
string
None
Tooltip text.
label
string
None
The label for the control.
mode
'default' | 'checkbox''default'
Mode:
-
default: Renders a switch control. -
checkbox: Renders a checkbox control.
checkbox

options
{ label: string; value: string | number; disabled?: boolean;}[][]
Options configuration.
maxCheckNum
number
None
Maximum number of selectable options. When this limit is reached, unselected options are disabled.
label
string
None
The label for the control.
tooltip
string
None
Tooltip text.
radio

options
{ label: string; value: string | number; info?: string; iconClassName?: string; img?: string; disabled?: boolean;}[][]
Options configuration.
mode
'img' | 'icon' | 'default''default'
Mode. Supports
img,icon, anddefault. Thedefaultmode includes a tooltip and an ellipsis for overflow text.useRadioButton
boolean
false
If true, renders the options as radio buttons.
slider

max
number
1
Maximum value.
min
number
0
Minimum value.
step
number
0.01
The increment step for the slider.
isPercent
boolean
true
Controls whether to display the value as a percentage.
color

mode
'default' | 'classic''default'
The display mode for the color picker.
-
default: The standard interface. -
classic: The legacy interface.
classicSize
'large' | 'middle' | 'small''large'
Size. Takes effect only in
classicmode.placement
'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom''bottom'
The direction in which the color picker pops up.
isFontMode
boolean
false
If true, activates font color mode.
disableAlpha
boolean
false
If true, disables the alpha (transparency) channel.
allowClear
boolean
false
Controls whether the selected color can be cleared.
toRgb
boolean
false
Outputs the color in RGB format.
tab

-
tab1
-
tab2
options
{ text: string; value: string | number; disable?: boolean;}[][]
Tab options.
style
object
None
Tab style.
-
object: Whentypeisobject, you can group a series of form items, including their configurations and values. For example:// meta.js export default = { "propsSchema": { "styleSchema": { "schema": { "title": "Basic Settings", "type": "object", "properties": { "group1": { "type": 'object', "properties": { "address": { "title": "Address", "type": "string", "defaultValue": "aaaa", }, "phone": { "title": "Phone", "type": "string" , "defaultValue": "1234567", } } } } } } } } // The final output is available in the component's props.customProps.viewConfig. props.customProps.viewConfig = { // ... group1: { "address": "aaaa", "phone": "1234567" } } -
array: Whentypeisarray, you can combine one or more editors into an array form. In this case,propertiesspecifies the editor type for each item, which can be any supportededitortype such asnumber,string, orobject. You can also set a default value for new items usingarrayItemDefaultValue. For example:// meta.js export default = { "propsSchema": { "styleSchema": { "schema": { "title": "Group1", "type": "object", "properties": { "simpleArray": { "title": "Array", "type": "array", "properties": "number", // The editor type for each item "arrayItemDefaultValue": 5 // The default value for each new item }, "multiArray": { title: "Array 2", type: "array", properties: { name: { type: "string", props: { // ... } }, age: { type: "number", props: { // ... } } } } } } } } } // The final output is available in the component's props.customProps.viewConfig. props.customProps.viewConfig = { // ... "simpleArray": [1, 2, 3, 4, 5], "multiArray": [{ name: 'aa', age: 12 }, { name: 'bb', age: 13 }] }
-
-
schema.title: The title of the editor. For example:// ... phone: { title: 'Phone', type: 'string', },
-
schema.titleAlign: The alignment of the editor title. -
schema.properties: Whenschema.typeisobjectorarray, the editor's value is a structuredobjectorarrayinstead of a primitive type. In this case,schema.propertiesdefines the structure of each value. The interface is as follows:type StyleSchemaProperties = | { [key: string]: StyleSchemaBase; } | stringWhen
schema.propertiesis a string, it serves the same purpose asschema.type, and the attributes inschema.propsare passed to each sub-editor. The editor's value type is determined by the value ofschema.properties. For example:{ a: { type: 'array', properties: 'string', // Each item in the array is a string // props attributes are passed to each input box props: { placeholder: 'Enter a value' } } } // Final output: each item in the array is a string { a: ['xx', 'xx'] }When
schema.propertiesis an object, each item's value is an object whose structure is determined by thepropertiesconfiguration. For example:// meta.js { a: { type: 'object', properties: { c: { type: 'string' } } }, b: { type: 'array', properties: { c: { type: 'string' } } }, } // Final output { a: { c: 'xxxx' }, b: [{ c: 'xxx' }] } -
schema.className: The class name for the editor title. -
schema.description: The editor's description, displayed below the editor.For example:
// ... phone: { title: 'Phone', type: 'string', description: 'this is a description', },
-
schema.propertyOrder: The display order of the editors, arranged from top to bottom in ascending numerical order. -
schema.id: The identifier for the editor, typically used for conditional visibility or disabling. -
schema.hide: If true, hides the editor. -
schema.visibleDepends: Controls the editor's visibility based on conditions.By adding an ID to an editor, you can set a condition where
it is displayed only when the values of certain editors are X.Note-
A hidden editor does not trigger its
onChangeevent. -
Hiding an editor also hides all of its child editors.
The
StyleSchemaDependinterface is as follows:type StyleSchemaDependId = number | string; interface ValueDepend { /** The ID used to identify an editor */ id: StyleSchemaDependId; /** The value of the editor */ value: any | any[]; } interface PatternDepend { id: StyleSchemaDependId; /** A regular expression */ pattern: string; } type StyleSchemaBaseDepend = ValueDepend | PatternDepend; interface StyleSchemaAndDepend { $and?: StyleSchemaDepend[]; } interface StyleSchemaOrDepend { $or?: StyleSchemaDepend[]; } type StyleSchemaDepend = StyleSchemaBaseDepend | StyleSchemaAndDepend | StyleSchemaOrDepend;For example:
// ... { a: { title: 'a', type: 'string', id: 'a', }, b: { title: 'b', type: 'string', id: 'b', visibleDepends: [{ id: 'a', value: 'china' }], // This component is only rendered when the value of the editor with id 'a' is 'china'. }, c: { title: 'c', type: 'string', id: 'c', visibleDepends: [{ id: 'a', pattern: '^china' }], // This component is only rendered when the value of the editor with id 'a' starts with 'china'. }, }When you need to combine multiple conditions, you can use
$andor$orto combine them. The following is an example:// ... { d: { title: 'd', type: 'string', id: 'd', visibleDepends: [ { $or: [ { id: 'a', value: 'china' }, { id: 'a', value: 'usa' }, ], }, ], // This component is only rendered when the value of the editor with id 'a' is 'china' or 'usa'. }, } -
-
schema.disabled: If true, disables the editor. -
schema.disableDepends: Defines conditions to disable the editor. This is configured the same way as visibleDepends. -
schema.hideIfDisable: If true, hides the editor when it is disabled. -
schema.validation: The editor's validation rules for form values.The
validationproperty is an array of rule objects. A value must satisfy all defined rules to be considered valid.// Validation rule interface interface StyleSchemaValidationRule { message: string; [rule: string]: any; funcName?: string; }-
message: The error message for failed validation. -
[rule: string]: Validation configuration properties.The following table lists common configuration properties.
Validation property
Value type
Description
type
string (default)
String type.
number
Number type.
boolean
Boolean value.
integer
Integer type.
float
Float type.
array
Array type.
enum
Enumerated type.
date
Date type.
url
URL-formatted string.
email
Email-formatted string.
required
boolean
If true, makes the field required.
pattern
string
Regular expression.
min
number
-
When
typeisstring, validates the minimum string length. -
When
typeisnumber, validates the minimum value.
max
number
-
When
typeisstring, validates the maximum string length. -
When
typeisnumber, validates the maximum value.
len
number
-
When
typeisstring, validates the exact string length. -
When
typeisarray, validates the exact array length.
-
-
funcName: The name of the custom validation function.If you pass in
funcName, the other validation configuration props are ignored. For more information, see validation. The following is an example:// ... { address: { title: 'Address', type: 'string', validation: [ { required: true, message: 'This field is required.', }, { message: 'Length must be exactly 7.', len: 7, }, { message: 'Must start with "china".', pattern: '^china', }, ], }, population: { title: 'Population', type: 'number', validation: [ { type: 'integer', min: 1000, message: 'The minimum value is 1000.', }, { type: 'integer', max: 100000, message: 'The maximum value is 100000.', }, ], }, url: { title: 'url', type: 'string', validation: [ { type: 'url', message: 'The value is not a valid URL.', }, ], }, email: { title: 'email', type: 'string', validation: [ { type: 'email', message: 'The value is not a valid email address.', }, ], }, }
-
-
schema.showRequiredMark: If true, displays the required field indicator (*). -
schema.hideValidateTips: If true, hides validation error messages. -
schema.defaultValue: The editor's default value. -
schema.props: Thepropsobject contains attributes that are passed directly to the editor component.For example:
// ... "phone": { "title": "Phone", "type": "string", // These properties are passed to the "string" editor. "props": { placeholder: "Enter phone number" } }Here,
placeholderis a property of thestringeditor. For details on the properties of each editor, see schema.type. -
schema.redirect: Renames the form field's key in the final output.By default, the keys in the form output match the keys configured in
styleSchema. For example:styleSchema: { schema: { type: 'object', properties: { a: { type: 'object', properties: { b: { type: 'string' } } } } } } // Final output structure { "a.b": "..." }If you think the output hierarchy is too deep, you can use
redirectto rename the key. The following is an example:styleSchema: { schema: { type: 'object', properties: { a: { type: 'object', properties: { b: { type: 'string', redirect: 'b' } } } } } } // Final output structure { "b": "..." } -
schema.suffix: A suffix for the editor. For example:xx: [select] days. -
schema.grid: The layout property for the editor. Supports layouts like vertical and multi-column arrangements.-
col: The column width, which follows a24-columngrid system.For example, a value of 12 represents a 50% width.
-
row: The row number.
For example:
{ title: '', type: 'object', properties: { // The project name and bound project name fields are displayed side-by-side. projectName: { title: 'Project Name:', type: 'string', props: { placeholder: 'Enter the project name description' } grid: { row: 0, // Row number col: 12 // Column width (follows a 24-column grid system; 12 is 50% width) } } } }; -
-
validation: Custom validation functions can be passed to the editor through thevalidationobject. The interface is as follows:interface StyleSchemaValidation { [validateFuncName: string]: ( rule?: any, currentValue?: any, extras?: { data?: any; schema?: Schema; keyPaths?: string[] }, ) => string | Promise<any> | void; }-
rule: The current validation rule. -
currentValue: The current value of the editor. -
extras: Additional information about the editor.
For example:
// meta.js export default { propsSchema: { schema: { ... test: { type: 'string', validation: [ { funcName: 'isNum' } ] } }, validation: { isNum: function(rule, currentValue) { if (typeof currentValue !== 'number') { return `${currentValue} is not a number.` } } } } } -
-
localEditors: Defines custom editors. This feature is currently under development.
-
-
propsSchema.dataSchema
Defines the data model for fetching data and customizing the component's data panel.
interface DataSchema { /** Field settings */ areas: DataSchemaArea; /** Result display configuration */ resultDisplay: ResultDisplay; }In the Quick BI data panel, a dataset contains two types of fields: dimension and measure. You can drag these fields into different areas to control data retrieval. The data panel includes the following areas:
-
Drill area
-
Dimension area
-
Measure area
-
Filter area
-
propsSchema.dataSchema.areas
Configures the areas in the data panel. The interface is as follows:
interface DataSchemaArea { /** The ID of the area. */ id?: 'area_column' | 'area_row' | 'drill' | 'filters'; /** The functional type of the area. */ queryAxis?: 'dimension' | 'measure' | 'drill' | 'filters'; /** The display name of the area. */ name: string; /** The tooltip for the area name. */ nameTip?: string; /** The configuration rules for the area. */ rule: DataSchemaAreaRule; }-
propsSchema.dataSchema.areas[].id: The ID of the area.Valid values:
-
area_column: ID for the measure area. -
area_row: ID for the dimension area. -
drill: ID for the drill area. -
filters: ID for the filter area.
-
-
propsSchema.dataSchema.areas[].rule: The configuration rules for the area. The interface is as follows:interface DataSchemaAreaRule { /** Placeholder text. */ placeholder?: string; /** The field types allowed in the area. */ fieldTypes: ('dimension' | 'measure')[]; /** Specifies whether the area is required. */ required?: boolean; /** The maximum number of fields allowed in the area. */ maxColNum?: number; }-
rule.fieldTypes: Specifies the field types allowed in the area.Valid values:
-
dimension: Accepts only dimension fields. -
measure: Accepts only measure fields.
This property is an array. To accept all supported types, use the following configuration:
fieldTypes: ['dimension', 'measure'] -
-
rule.required: Specifies whether the area can be empty. -
rule.maxColNum: The maximum number of fields allowed in the area.
-
-
propsSchema.dataSchema.areas[].queryAxis: The functional type of the area.Valid values:
-
column: Corresponds to the measure type. -
row: The dimension type. -
drill: Drill type.In this case,
rule.fieldTypesmust bedimension. -
filters: Filter type.
-
-
propsSchema.dataSchema.areas[].name: The display name of the area.Example:
const componentMeta = { // ... dataSchema: { areas: [ { id: 'drill', name: 'drill/dimension', queryAxis: 'drill', rule: { fieldTypes: ['dimension'], required: false, maxColNum: 6, }, }, { id: 'area_row', name: 'dimension', queryAxis: 'row', rule: { fieldTypes: ['dimension'], // dimension or measure maxColNum: 1, // The maximum number of fields allowed. required: true, // Specifies whether this field is required to update the chart. }, }, { id: 'area_column', name: 'measure', queryAxis: 'column', rule: { fieldTypes: ['measure', 'dimension'], maxColNum: 3, required: true, }, }, { id: 'filters', name: 'filter', // Name queryAxis: 'filters', rule: { fieldTypes: ['dimension', 'measure'], required: false, }, }, ], resultDisplay: { upLimit: 1000, }, } }
-
-
propsSchema.dataSchema.resultDisplay
Configures the result display section in the data panel. The interface is as follows:
interface ResultDisplay { /** Upper limit. */ upLimit?: number; /** Lower limit. */ downLimit?: number; /** Specifies whether to hide the result display section. */ hide?: boolean; }
-
propsSchema.dataSchema.resultDisplay.upLimit: The maximum number of data records to retrieve. -
propsSchema.dataSchema.resultDisplay.downLimit: The minimum number of data records to retrieve. Default:1. -
propsSchema.dataSchema.resultDisplay.hide: Specifies whether to hide the result display section. Default:false.
-
-
-
Deprecated APIs
NoteThe data panel was updated in Quick BI v4.1.1.1, making the following legacy APIs
deprecated. Refer to these APIs only if you are using a Quick BI version earlier than v4.1.1.1.-
(deprecated in v4.1.1.1) schema: Data panel configuration. The interface is as follows:interface DataSchema { schema: DataSchemaBase; } interface DataSchemaBase { area: DataSchemaArea[]; limitNum: number; } -
(deprecated in v4.1.1.1) schema.area: Data panel area configuration. The interface is as follows:interface DataSchemaArea { id?: 'area_column' | 'area_row' | 'drill' | 'filters'; queryAxis?: 'dimension' | 'measure' | 'all'; areaName: string; columnList?: any[]; rule: DataSchemaRule; }-
(deprecated in v4.1.1.1) schema.area[].id: The area ID.Possible values include:
-
area_column: The measure area ID. -
area_row: The dimension area ID. -
drill: The drill area ID. -
filters: The filter area ID.
-
-
(deprecated in v4.1.1.1) schema.area[].rule: Configuration rules for the area. The interface is as follows:interface DataSchemaRule { type: 'dimension' | 'measure' | 'all'; required?: boolean; maxColNum?: number; show?: boolean; }-
rule.type: The field types that the area accepts.Possible values:
-
dimension: Accepts only dimension fields. -
measure: Accepts only measure fields. -
all: Accepts both dimension and measure fields.
-
-
rule.required: Whether the area can be empty. -
rule.maxColNum: The maximum number of fields that the area accepts.
-
-
(deprecated in v4.1.1.1) schema.area[].queryAxis: The query role of the area.Possible values include:
-
column: The area is for measures. -
row: The area is for dimensions. -
drill: The area is for drill-down fields.This type requires
rule.typeto bedimension. -
filters: The area is for filters.
-
-
(deprecated in v4.1.1.1) schema.area[].areaName: The name of the area.Example:
{ "area": [ { "id": "drill", "areaName": "Drill/Dimension", "queryAxis": "drill", "rule": { "show": false, "type": "dimension", "required": false, "maxColNum": 6 }, "columnList": [] }, { "id": "area_onerow", "areaName": "Dimension", "queryAxis": "row", "rule": { "type": "dimension", "maxColNum": 1, "required": true }, "columnList": [] }, { "id": "area_column", "areaName": "Measure", "queryAxis": "column", "rule": { "type": "measure", "maxColNum": 3, "required": true }, "columnList": [] }, { "id": "filters", "areaName": "Filters", "queryAxis": "filters", "rule": { "type": "all", "required": false }, "columnList": [] } ], "limitNum": 1000 }
-
-
(deprecated in v4.1.1.1) schema.limitNum: The maximum number of records to fetch.
-
-
propsSchema.advancedSchema
Specifies the configuration for the form in a custom component's advanced panel. (This feature is under development.)




