Plugin - HideChartTypeByGroup
Plugin - Hide Widget Type in Chart Type Dropdown From User Groups
This plugin hides widget types from the widget selection dropdown menu, for user groups set in the config of the plugin. The widget types hidden are set in the config. Widgets of that type that are pre-existing in dashboards can still be viewed and edited by all users.
Installation
To install this plugin, download and unzip the attachment. Then drop the HideChartTypeByGroup folder into your plugins folder (/opt/sisense/storage/plugins). Enable the plugin on the Add-ons tab in the Admin section, wait for the plugin to build, and the plugin will be enabled.
Configure
To configure this plugin, set the two parameters in the config.6.js file, chartTypesToHide, and userGroupToModify. chartTypesToHide is an array of strings of the chart names to hide in the dropdown menu, userGroupToModify is an array of group OIDs for which users belonging to those groups the charts defined in chartTypesToHide will be hidden in the dropdown menu. Below is an example of a config.6.js file:
export const config = {
// Chart types to hide in the dropdown, case sensitive, include full name
chartTypesToHide: ["Bar Chart", "BloX"],
// Members of these groups will have this plugin modify the dropdown
// Group unique OID, can be copied from group API or from prism.user.groupNames
userGroupToModify: ["6532f4a99760e6cbf6e18585", "3265f4a99760e3bbe3e18517"]
}
Tip - Include the full name of the Chart type exactly as it appears in the dropdown to avoid potentially hiding Charts that also include the string.
Below is an example of the plugin hiding the Bar Chart option in the widget selection dropdown for a user that is a member of one of the groups set in userGroupToModify.
How did the plugin work for you? What other type of plugin are you looking to learn more about? Let me know in the comments!
Published 11-08-2023
JeremyFriedel
Sisense Employee
Joined November 16, 2021