Title customization
Reading time:
Adding a standard title to the module
Adding a customized title by dimension to the module
e.g. If you want to change the title according to the activated dimension.
To achieve this,
- Get fields used in the dimension and the alternative dimension
2 : Add them to Customized Function, here is a example of code.
function ( dimensions, measures, categories, allData, filters, totalCount )
{ if (dimensions[0].field == 'stay_eta_ent' )
{ return 'Number of Stays by Entry Facility' ; }
if (dimensions[0].field == 'stay_srv_ent_desc' )
{ return 'Number of Stays by Entry Ward' ; }
}
Adding a customized title by measure to the module
If you want to change the title according to the activated measure , here is a example of code for customized function.
function ( dimensions, measures, categories, allData, filters, totalCount )
{ if (measures[0].field == 'moy_stay_dms' )
{ return 'ADS by Entry Facility' ; }
if (measures[0].field == 'sum_stay_dms' )
{ return 'Duration of Stay by Entry Facility' ; }
}
Adding a customized title by measure category to the module
If you want to change the title according to the activated measure category ,
here is the example of code to add to the customized function.
function ( dimensions, measures, categories, allData, filters, totalCount )
{
let title = '' ;
categories.forEach( function (item )
{if (item.field == measures[0].category)
{title += item['name'] + ' by Date' ; }
});
return title;
}
Add a subtitle
Enable 'Tooltip Subtitle' if you want the subtitle show as a tooltip.
Last update: 25 November 2024
Views: 171