Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello there,
I have column with 2 distinct value say A and B. I want to give ability to a user to change colors of A and B category. I managed to display color settings for each cateogry in that column but I am not sure how to fetch and retain those value.
capabilities.json file
"objects": {
"alertSettings": {
"displayName": "Alert",
"properties": {
"color": {
"displayName": "Color",
"type": {
"fill": {
"solid": {
"color": true
}
}
}
}
}
}
}
Settings enumeration function
public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
const settings: VisualObjectInstance[] = [];
switch (options.objectName) {
case 'alertSettings':
// uniqueAlerts is an array containing unique values from alert column.
this.uniqueAlerts.forEach((alert) => {
settings.push({
objectName: options.objectName,
displayName: alert,
properties: {
color: ''
},
selector: {
metadata: alert
}
});
})
break;
default:
break;
}
if (settings.length > 0) {
return settings;
} else {
return (AutoPlantVisualSettings.enumerateObjectInstances(this.autoPlantSettings, options) as VisualObjectInstanceEnumerationObject);
}
}By using above code I got the following result.
How do I get the color value selected by user?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |