Hey mate,
Sure thing - i've provided a few variables at the top of the script to change selected and unseelcted colors:
let selectedColor = "#F7921E"
let unselectedColor = "#00ACCD"
widget.on('processresult', (w, args) => {
let categoryItem = widget.metadata.panels[0].items[0].jaql.dim
let myTeams = widget.dashboard.filters.item(categoryItem).jaql.filter.members
args.result.series[0].data.forEach((d) => {
d.color = unselectedColor
d.selected = false
})
for (let i = 0; i < myTeams.length; i++) {
let myTeam = myTeams[i]
args.result.series[0].data.find((d) => { return d.selectionData[0] === myTeam }).color = selectedColor
}
for (let j = 0; j < args.result.xAxis.categories.length; j++) {
if (!myTeams.includes(args.result.xAxis.categories[j])) {
args.result.xAxis.categories[j] = ''
}
}
})
With the value labels, you can do this in the interface (the "Value Label" toggle):
Let me know how you go?
Thanks,
Daniel
RAPID BI
[email protected]
RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons