Dashboards excel at presenting a wealth of valuable information on a single page. However, sometimes a basic dashboard layout fails to accommodate the desired volume of data on a single screen. In this article, we will demonstrate a method to amplify the presentation of information through the use of a tabbed component. It’s important to note that this is not a built-in and we will need to write some code.
Here’s what we’re looking for:
Instructions
1. Create a dashboard
The layout of the dashboard should conform to the following structure. The first line should have a single cell with the code snippet. Any other objects you want to appear in a tabbed item must occupy lines below the snippet. No matter how many items are in each row, they will be moved inside the tabbed item anyway. In our example, we’ll display three grids, a single record, a chart, and a report inside the tabbed item.
Here is an example layout:
2. Code snippet
The idea of this code is to display an empty tabbed panel. Nothing special here, just basic Bootstrap-based HTML. The only important thing here is the ID of this panel which is dashtabs. We will use this identifier in Javascript and CSS code.
PHP
C#
3. Dashboard Javascript OnLoad event
This code goes through the array of dashboard items and moves them one by one to the tabbed panel. See online reviews for more information.
4. Custom CSS
This code goes to Style Editor -> Edit CSS section. Just hide unnecessary decoration and make the tabs prettier.
Happy coding!