It is not only a fully functional graph visualization library, but also an explorer of data relationships.
!!!###!!!title=Openinula-VTable——VisActor/VTable tutorial documents!!!###!!!!!!###!!!description=The `@visactor/openinula-vtable` package is a Openinula encapsulation to make it easier to use VTable in the Openinula environment. This component mainly encapsulates the VTable table in Openinula component form, and the related configuration items are consistent with the VTable.!!!###!!!
Openinula-VTable
The @visactor/openinula-vtable package is a Openinula encapsulation to make it easier to use VTable in the Openinula environment. This component mainly encapsulates the VTable table in Openinula component form, and the related configuration items are consistent with the VTable.
Quick start
Environmental requirements
Make sure node, npm and Openinula are installed in your environment and meet the following version requirements:
node 10.12.0+
npm 6.4.0+
openinula 0.1.2-SNAPSHOT+
Install
Install using the package manager
Introducing Openinula-VTable
It is recommended to use npm package to import
Draw a simple list
You can use the ListTable component imported via @visactor/openinula-vtable just like a standard Openinula component.
Openinula-VTable provides two styles of components for developers to use, namely unified tags and syntactic tags.
Unified tags
Unified tags refer to using a Table tag to receive a complete option configuration. If VTable is already used in the project, this method can quickly use Openinula-VTable. The above example is a demo using unified tags.
Same as VTable Openinula-VTable provides three table types:
ListTable: List table, used to display list data demo
PivotTable: Pivot table, used to display cross-pivot data demo
PivotChart: Pivot chart, used to display cross-pivot data and display it in a chart demo
The props of these three Openinula components are defined as follows:
For the definition of EventsProps, refer to the event binding chapter.
onReady is a built-in callback event that will be triggered when the table is rendered or updated. Its input parameters respectively represent the table instance object and whether it is rendered for the first time.
The Openinula-VTable unified label is almost the equivalent function of VTable, which can facilitate developers to migrate Openinula versions, and options obtained from the community or sample center can be used directly in this way, with almost no additional learning cost for developers.
Grammatical tags
Grammatical tags mean that Openinula-VTable encapsulates some components in the table as Openinula components and exports them to developers. Developers can define tables in a way that is more semantic and closer to native Openinula declarations. It should be noted that the definition content of grammatical tags can be converted into each other with the table description option in most scenarios.
It should be noted that although the chart is declared in the form of a Openinula component by definition, it is not parsed into a DOM for rendering in the actual implementation. Therefore, if you use the inspection element, you cannot see the DOM corresponding to each chart component.
ListTable
The props attributes accepted by ListTable are consistent with options. The subcomponents in ListTable are as follows
ListColumn: List column, consistent with the definition of columns in option api
Menu: drop-down menu component, consistent with the definition of menu in option api
Tooltip: tooltip component, consistent with the definition of tooltip in option api
Event binding
The Props of the outermost table component of the unified label or the syntactic table label inherit the event processing callback EventsProps of the table.
EventsProps are defined as follows:
Event usage example:
For detailed description of the event, please refer to: Event Introduction