Astroraf
03-05-2025Data Pipeline
How to Have Break By Switchable Dimensions Update Title
I am trying to have the Break By Update the title of the Switchable Dimension rather than dimension.
My script goes as follows.
prism.registerSwitchDimension({
widget: widget,
widgetTitleTemplate: "{{val}} By {{dim}}", // Dynamically updates title with value and dimension
maxItemsBeforeSubMenuIsCreated: 5, // Keeps the menu clean if more dimensions are added
dimensions: [
{
panel: 'break by', // Ensure this matches the panel name in your widget
dims: [
{
"index": 0,
"dim": "[GMV_ORDERS_DASH_UNION.SUPPLIER]",
"datatype": "text",
"title": "Supplier",
"widgetTitleTemplate": "{{val}} By Supplier"
},
{
"index": 0,
"dim": "[GMV_ORDERS_DASH_UNION.MANUFACTURER]",
"datatype": "text",
"title": "Manufacturer",
"widgetTitleTemplate": "{{val}} By Manufacturer"
},
{
"index": 0,
"dim": "[GMV_ORDERS_DASH_UNION.CUSTOMER]",
"datatype": "text",
"title": "Customer",
"widgetTitleTemplate": "{{val}} By Customer"
}
]
}
]
});