cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Introduction
The following article describes the steps needed to implement the “auto-labelling” plugin.
Business Case
In some cases such as when embedding dashboards and widgets, or integrating them in a presentation, it is sometimes hard to know what filters have been applied. This plugin creates a text from the applied dashboard-level filters and appends it to each widget's title and subtitle. Text can also be auto-generated for x-axis labels. 
Configuration allows ignoring certain widgets and/or filters, and allows some fine-tuning for x-axis text generation.
 
Example
See below graph with auto labelling activated: 

See Below graph with an example of a aggregation period applied: 
Additional notes:
  • The script will take the widget title and place it prior to the first “|”.  If you want to edit your widget title, just edit the text prior to that first “|”.  
  • We also utilize the names you’ve given your filters on the right in order to construct how they will be populated into the charts.  So if you want to change how something is displayed, just change the name of the filter in the filter panel.  
  • Items utilized in the X-Axis, break-by, columns, or Rows are automatically hidden from the labeling title.  If you want to force a filter to show, use 
 
Steps

STEP 1 - DOWNLOAD AND EXTRACT THE ENCLOSED FOLDER INTO THE PLUGINS FOLDER:

C:\Program Files\Sisense\PrismWeb\plugins\labellingWidget,  if the "plugins" folder is not there, please create it.

STEP 2 - CREATE A NEW DASHBOARD OR USE AN EXISTING ONE

STEP 3 - CLICK EDIT SCRIPT AND PASTE THE BELOW TO ACTIVATE THE PLUGIN ON THIS DASHBOARD

dashboard.labelling = {}

Configuration Options
 
Below is the list of available configuration options (Note syntax of dimensions is ‘[Table.Column]’ as is found in console or dashboard export file):
 
dashboard.labelling = {
     // Allows to ignore specific filtering dimensions in the labelling text. Defaults to []
     ignoreDims: ['[Offline Banner 1.Question]', '[Questions.segment]'],
 
     // Allows to ignore specific filtering members if they are set to a certain value.  Syntax is how a member is shown in the title.  Main use case would be to hide selections that don’t need to be shown (like Total Public). Defaults to []
     ignoreMembers: ['Comparison Period: Selected Period', 'Segments:Total Public'],
 
     // Allows to define the list of chart types to activate title labelling on. Defaults to ['chart/bar', 'chart/column', 'chart/pie', 'chart/line', 'tablewidget', 'pivot', 'indicator', 'wordCategoryCloudWidget', 'chart/area', 'chart/scatter', 'treemap', 'sunburst', 'chart/polar', 'chart/boxplot', 'heatmap']
     titleChartType: ['chart/bar', 'chart/column', 'chart/pie', 'chart/line'],
 
     // Allows a user to define dimensions that should be shown whether or not they are utilized with-in a widget as a column, row, x-axis, or break-by.  Defaults to []
     forceDims: ['[Offline Banner 1.Question]'],
 
     // Forces auto labelling to ignore certain widgets entirely. Defaults to [].
     ignoreWidgetsIds: ['5f56a4d8d8e85c34d0e9e656', '5f56a4d8d8e85c34d0e9e65b'],
 
     // Allows labelling text to ignore custom filters. Defaults to true.
     ignoreCustomFilters: false
 
     // This set of configurations is primarily used if you are adjusting time aggregations using cube dimensions.  For example, you may have specific rolling daily/weekly/monthly options configured in a table so that a user may use a drop-down to select the rolling trend they’d like to see.  These configurations take that dimension and places it in the x-axis label so you can easily see which aggregation period is shown.
     // Allows to define the list of chart types to activate x-axis labelling on. Defaults to  ['chart/line', 'chart/area']
     xAxisChartType: ['chart/line', 'chart/area'],
 
     // OR Allow to define the list of widget ids to activate x-axis labelling on. Defaults to []
     xAxisWidgetIds: ['5f56a4d8d8e85c34d0e9e656'],
 
     // Manually define what dimensions to use for x-axis labelling. Defaults to []
     xAxisTitleDims: ['[Dim_Date: Rolling Weeks.Rolling Period]'],
 
     //Allows you to define your date dimension if you are utilizing a cube level aggregation.  This ensures that date will always come out as “[Period] ending: [Date]”.  Defaults to ''
     dateDim: '',
}
Rate this article:
Version history
Last update:
‎03-02-2023 09:14 AM
Updated by:
Contributors