The DashboardLayout is a grid structured layout control, that helps to create a dashboard with panels. Panels hold the UI components or data to be visualized with flexible options like resize, reorder, drag-n-drop, remove and add, that allows users to easily place the panels at a desired position within the grid layout.
<div id="default-layout">
<script>
let dashBoardObject : DashboardLayout = new DashboardLayout();
dashBoardObject.appendTo('#default-layout');
</script>
boolean
If allowDragging is set to true, then the DashboardLayout allows you to drag and reorder the panels.
Defaults to true
boolean
If allowFloating is set to true, then the DashboardLayout automatically move the panels upwards to fill the empty available cells while dragging or resizing the panels.
Defaults to true
boolean
If allowResizing is set to true, then the DashboardLayout allows you to resize the panels.
Defaults to false
number
Defines the cell aspect ratio of the panel.
Defaults to 1
number[]
Defines the spacing between the panels.
Defaults to [5,5]
number
Defines the number of columns to be created in the DashboardLayout.
Defaults to 1
string
Defines the draggable handle selector which will act as dragging handler for the panels.
Defaults to null
boolean
Defines whether to allow the cross-scripting site or not.
Defaults to true
boolean
Enable or disable persisting component’s state between page reloads.
Defaults to false
boolean
Enable or disable rendering component in right to left direction.
Defaults to false
string
Defines the media query value where the dashboardlayout becomes stacked layout when the resolution meets.
Defaults to ‘max-width:600px’
Defines the panels property of the DashboardLayout component.
Defaults to null
string[]
Defines the resizing handles directions used for resizing the panels.
Defaults to ‘e-south-east’
boolean
Enables or disables the grid lines for the Dashboard Layout panels.
Defaults to false
Adds the handler to the given event listener.
Parameter | Type | Description |
---|---|---|
eventName | string |
A String that specifies the name of the event |
handler | Function |
Specifies the call to run when the event occurs. |
Returns void
Allows to add a panel to the Dashboardlayout.
Parameter | Type | Description |
---|---|---|
panel | PanelModel |
Defines the panel element. |
Returns void
Appends the control within the given HTML element
Parameter | Type | Description |
---|---|---|
selector (optional) | string | HTMLElement |
Target element where control needs to be appended |
Returns void
Adding unload event to persist data when enable persistence true
Returns void
When invoked, applies the pending property changes immediately to the component.
Returns void
Destroys the DashboardLayout component
Returns void
Removing unload event to persist data when enable persistence true
Returns void
Returns the persistence data for component
Returns any
Returns the route element of the component
Returns HTMLElement
Handling unload event to persist data when enable persistence true
Returns void
Moves the panel in the DashboardLayout.
Parameter | Type | Description |
---|---|---|
id | string |
Defines the panel ID. |
row | number |
Defines the row of dashboard layout. |
col | number |
Defines the column of dashboard layout. |
Returns void
Method to update the draggable handle when draggable panel elements are bound dynamically.
Returns void
Removes all the panels from the DashboardLayout.
Returns void
Removes the handler from the given event listener.
Parameter | Type | Description |
---|---|---|
eventName | string |
A String that specifies the name of the event to remove |
handler | Function |
Specifies the function to remove |
Returns void
Removes the panel from the DashboardLayout.
Parameter | Type | Description |
---|---|---|
id | string |
Defines the panel ID. |
Returns void
Resize the panel in the DashboardLayout.
Parameter | Type | Description |
---|---|---|
id | string |
Defines the panel ID. |
sizeX | number |
Defines the sizeX of dashboard layout. |
sizeY | number |
Defines the sizeY of dashboard layout. |
Returns void
Returns the panels object of the DashboardLayout.
Returns PanelModel[]
Allows to update a panel in the DashboardLayout.
Parameter | Type | Description |
---|---|---|
panel | PanelModel |
Defines the panel element. |
Returns void
Dynamically injects the required modules to the component.
Parameter | Type | Description |
---|---|---|
moduleList | Function[] |
? |
Returns void
Triggers whenever the panels positions are changed.
EmitType<Object>
Triggers when Dashboard Layout is created.
EmitType<Object>
Triggers when Dashboard Layout is destroyed.
Triggers while a panel is dragged continuously.
Triggers when a panel is about to drag.
Triggers when a dragged panel is dropped.
Triggers when a panel is being resized continuously.
Triggers when a panel is about to resize.
Triggers when a panel resize ends.