The Tabber Widget Switcher Plugin
*This plugin is officially supported by Sisense. You can find the latest version of this plugin on the Sisense Add-Ons page.
Introduction
The Tabber Plugin creates a new widget that allows the user to switch between views easily and quickly without changing the dashboard.
Please note this widget is designed to be used only once per dashboard. It also does not yet support saving the tabber state after refreshes or filter changes.
Example
Tabber Widget can be used to view data in different time zone (Current Month , Last Month) or to view data in different categories (Revenues, Sales,Orders ).
Also, the Tabber can be used to view the same data in different ways (chart, numeric, table).
You can add many Tabber names as long it fits in the same row.
Also, you can add more than one Tabber Widget in the same Dashboard if necessary.
Steps
A Tabber widget can be added to all Dashboards and can be used with all widgets.
In order to add a Tabber widget, please follow the listed steps below:
Step 1:
Download and extract the enclosed folder into the plugins folder:
C:\Program Files\Sisense\PrismWeb\plugins\WidgetsTabber, if the "plugins" folder is not there, please create it
Step 2:
Create a new Tabber Widget - Press Choose
and choose TABBER:
click apply to create the widget
Step 3:
Open the Tabber widget editor, edit script.
Copy the js code below into the script editor.
widget.on('render',function(w, e) {
e.prefixText = ''; e.suffixText = '';
e.selectedColor = '#86b817'; /*The color of the chosen title*/
e.fontColor = '#cccccc'; /*The color of the unchosen titles*/ e.elementWidth = '103%'; e.descColor = '#a5a5a5'; e.parentMarginLeft = '-15px'; e.height = 32; /* affects the tabber widget default high*/ });
widget.tabs = [
{
title: "Column Chart",
displayWidgetIds : ["55797a9459ef031011000032"],
hideWidgetIds : ["557d408a4630ccdc11000019"]
},
{
title: "Table",
displayWidgetIds : ["557d408a4630ccdc11000019"],
hideWidgetIds : ["55797a9459ef031011000032"]
}
];
Code configuration:
Each row represents a different tab. The order of the tabs is according to the rows as the appear in the code.
displayWidgetIds: In the [] write all the widgets ID's you with to display under the specific tab in “”, seperated by comma.
hideWidgetIds: In the [] write all the widgets ID's you with to hide from the specific tab in “”, seperated by comma.
- The widget ID appear in the widget url: Go to Edit Widget and copy the widget ID from the end of the widget url address- for example: http://localhost:8081/app/main#/dashboards/55797a3542f03101100002c/widgets/55797a9459ef031011000032
- The widget number is: 55797a9459ef031011000032
- In order to change the Tabber design - see design definition in the code (explanations are documented in the code).
- Press SAVE
- Close the Script window
- Refresh the widget and click apply
- The chart should appear with the Tabber widget and configuration.
Step 4:
Edit dashboard script to define hidden widgets.
Copy the js code below into the script editor.
dashboard.hideWidgetIds = ["556eb860106eb3f42100002f","556c26f88a6b1c68290000f8"];
hideWidgetIds: In the [] list ALL hidden widgets for ALL tabs in the Tabber between “”, seperated by comma
Step 5 Multiple widgets
To place multiple widgets under one tab,please copy the js code below into the script editor:
widget.tabsConfig = 'multiply'
Example:
Place two widgets on top of others:
Copy the js code below into the script editor: (do not forget to change widget ids)
widget.on('render',function(w, e){e.prefixText = '';
e.suffixText = '';
e.selectedColor = '#86b817'; /*The color of the chosen title*/
e.fontColor = '#cccccc'; /*The color of the unchosen titles*/
e.elementWidth = '103%';
e.descColor = '#a5a5a5';
e.parentMarginLeft = '-15px';
e.height = 32; /* affects the tabber widget default high*/
});
widget.tabs = [{title: "TAB 1 ", displayWidgetIds : ["57613637b2ea62dc36000004","57613637b2ea62dc36000006"], hideWidgetIds : ["57613637b2ea62dc36000007","57613637b2ea62dc36000005"]},
{title: "TAB 2", displayWidgetIds : ["57613637b2ea62dc36000007","57613637b2ea62dc36000005"], hideWidgetIds : ["57613637b2ea62dc36000004","57613637b2ea62dc36000006"]}
];
widget.tabsConfig = 'multiply';
Result:
03/09/2016 update:
Fixed column resizer issue
Added config to create multiple widgets in one row for one tab: (Add widget.tabsConfig = 'multiply' to widget edit script)
10/06/2015 update:
- New implementation of the tabber.
- Several assumptions that needed to take under consideration:
- Widgets and tabber are divided to 2 different rows per column.
- Each row contains only tabber/ tabbed widgets.
- The # of widgets that will be shown at the same time is equal to the number of tabbers in the row above (so, not capable of toggling 2 widgets from the same tabber).
-
Hi everyone,
I've been using Tabber for a little while now and I love this plugin. But I find it's a bit difficult to manage the script when you have more than two tabs. I'm not a Javascript expert at all but after a little experimenting I came up with the following code to make managing the different tabs a little easier.
widget.on('render',function(w, e){e.prefixText = '';
e.suffixText = '';
e.selectedColor = '#86b817'; /*The color of the chosen title*/
e.fontColor = '#cccccc'; /*The color of the unchosen titles*/
e.elementWidth = '103%';
e.descColor = '#a5a5a5';
e.parentMarginLeft = '-15px';
e.height = 32; /* affects the tabber widget default high*/
});
var tab1 = ["5a65dd3aacc5a4c19d92b08a","5a6aec7f3d2ebb0df8439b34"];
var tab2 = ["5a65dd4bacc5a4c19d92b093","5a6aec7f3d2ebb0df8439b35"];
var tab3 = ["5a685a59b1af8dbb8cc23497","5a6aec7f3d2ebb0df8439b36"];
widget.tabs = [{title: "TAB1", displayWidgetIds : tab1,
hideWidgetIds : tab2.concat(tab3)}
,{title: "TAB2", displayWidgetIds : tab2,
hideWidgetIds : tab1.concat(tab3)}
,{title: "TAB3", displayWidgetIds : tab3,
hideWidgetIds : tab1.concat(tab2)}
];
widget.tabsConfig = 'multiply';Basically I've created three arrays (tab1, tab2 and tab3), one for each tab I would like to display, containing the IDs of the widgets that should be visible on each of these tabs. This allows you to define the arrays once and then reference them when you're displaying and hiding widgets. So there's no more reason to repeat the same long character sequences for every time you're displaying or hiding specific widgets.
I'm using concat to combine the values of multiple arrays into a single array which is required if you're working with more than two tabs. You can keep chaining the concat-method if you have more than three tabs like this:
tab1.concat(tab2).concat(tab3).concat(tabx)...
Hope this is useful for those of you who have more than two tabs and are having difficulty managing the Tabber-script.
-
Latest released 01/2017 version conflicts with PDF download functionality. We are currently on V6.5.2.11007 and whenever we try PDF download of a dashboard with Tabbers, it gives "Error:Can't find variable:left at at http://localhost:8081/js/common.js?g=gofocobbAAc:61:1506 at forEach([native code]) at trigger...." So can you provide a fixed version or share link of latest version.
-
Hi Emma,
I haven't tested this myself yet, but I think you can make the widget respect the case of the titles you give them by modifying the file called widget.css, generally found in the folder C:\Program Files\Sisense\PrismWeb\plugins\WidgetsTabber on the server that's running Sisense.
There's a section called .defaultCSS that contains the style text-transform: uppercase;. That's most likely the code that's transforming your tab titles into uppercase. Removing this line of code should solve your problem. You can also comment it out instead by enclosing it within comment tags like this /*text-transform: uppercase;*/
Let me know if that worked for you.
Rolf
-
Hi Everyone,
Thank you for all your comments.
We understand the incidents you are having.
You have to keep in mind that the Plugins are not features within the system and therefore there is a chance it will not work with some of the other features.
With that said the Tabber Plugin is a Plugin that a lot of our users use and we received a lot of comments about it good and bad.
We are doing our best to solve all Tabber issues and will upload a new version of the plguin soon.
Best Regards,
Inbal
-
Rob you should try using Notepad++ do write out this script...I always name out all of my widget in note lines that way you can highlight and track where it is Displayed and Hidden and verify you have it setup correctly. Check out my PNG attached.
Tabber.PNG -
Has anyone been able to successfully encode IMAGES instead of text for the TABBER plug-in. So instead of the word 'chart' it would be an image of a chart icon, same for 'graph' (displaying instead as a graph icon)?
This would be helpful if anyone has any of that code within the script.
Thanks!!
-
Hi All,
Just jumping in here to tell you about our new plugin, the Dashboard Tabber
This plugin enables one to navigate quickly and easily between various dashboards from within the actual dashboard, without the need to navigate via the dashboard navigation pane. The various selected dashboards are independent by their Elasticube, widgets and filters, and can hold different filters between them. If they are all pulling data from the same Elasticube, they can have the same filters applied and these filters will stick during the navigation.
This plugin improves query performance as the various dashboards are loaded on demand, improving user experience by taking optimal advantage of dashboard real-estate and telling more with less.
Feel free to reach out for a live demo
Thanks
Ido
QBeeQ.pl
Sisense Partner of the Year 2019
-
A thought around feature improvement for the tabber: sometimes we use tabber to offer several different views of data that overall shares some characteristics, but quite often you may jump to a tabber view where only 2 of the 4 tabber options actually have data available to view. It would improve the user experience if we could automatically set the tabber widget to hide the options with no data to reduce confusion.
For example, if you have a view where your jump to takes you to several different views of types of fish, if there are no red fish at all in this subset of your data, don't show the red fish option at all.
-
I have it working on 8.1.2, but i was wondering if anyone else is having the tabber widget show up with a ton of space above and below it. I don't know what is happening, but the tabber widget is showing up with like 400 pxs of space.
In the output of the HTML I'm seeing this.. I don't know where that style is being added from for 416 px of height.
<widget type="WidgetsTabber" subtype="WidgetsTabber" family="" widgetid="5e7a0e0bc7848b0430586aa7" class="widget columnar narration-holder narration-holder__dashboard parentCSS" data-ng-class="{refreshing:widget.busy, hidden:layoutState.resizing || layoutCellState.resizing || layoutSubCellState.resizing,
renderMode: dashboard.renderMode, 'has-breadcrumbs': widget.metadata.isDrilled()}" data-ng-controller="dashboard-layout.controllers.columnar.widget" columnar-widget="" data-ng-style="{height: widgetHeight}" dashboard-columnar-draggable="" data-ng-repeat="element in subcell.elements track by element.widgetid" style="height: 416px;"></widget>
-
Hi Michal,
I'm glad you like our new plugin. I believe you will find it very useful.
The reason I did not attach the dashboard is because it's per URL.
I'm attaching it here as a .dash file but keep in mind that you need to change all widget ID in the code to the new ID the dashboard will present.
Best,
Inbal
EcommerceTabber.dash -
This is a great plugin, but I get problems when adding 2 Tabber widgets in the same dashboard.
My scenario -
Tabber 1 controls 2 widgets - Departments and Employees.
Tabber 2 control 2 widgets - Local Tasks and Master Tasks.When I click 'Master Tasks' on Tabber 2 it also switches the Tabber 1 widgets (But not vice versa). I have checked all the widget ID's and everything appears to be setup correctly.
Would having both Tabbers in the same dashboard column cause this issue?
Thanks
Jason
-
Hi Inbal,
I applied this plugin to add 3 tabs on my dashboard, each tab displays 1 table and 2 charts. But somehow every time i load the dashboard the 2 charts on each tab are overlapping resulting in poor visibility/understanding of the charts. What can I do to resolve this ?
Regards
Pooja
-
Hello there,
This is a great plugin, solves a lot of our issues. After implementing this to our dashboards we have the following issues:
1. When we change the tab to tab 2, we are losing part of our bar chart. (screenshot2).
2. In every refreshing or filter changing or hide filterbar tabber switch to the first selection.
Is there any way to solve these issues?
thanks
-
I'm having the same issue as Michael. The Tabber widget works perfectly, up until you change something. If I expand/collapse the filter pane, change a filtered value, etc the tabber loses focus on the widget it is suppose to display. Is there a way to persist the Tabber selection during a change to the dashboard state?
Please sign in to leave a comment.
Comments
76 comments