Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
How to display ColorPicker for each entry of data array in React ?
In visual.tsx I have this :
public getFormattingModel(): powerbi.visuals.FormattingModel {
return this.formattingSettingsService.buildFormattingModel(
this.formattingSettings
);
}
I have a settings.ts file like this :
class CategoryColorsCardSettings extends FormattingSettingsCard {
categoryColor = new formattingSettings.ColorPicker({
name: "fill",
displayName: ,
value: { value: },
selector: dataViewWildcard.createDataViewWildcardSelector(
dataViewWildcard.DataViewWildcardMatchingOption.InstancesAndTotals
),
altConstantSelector:,
instanceKind: powerbi.VisualEnumerationInstanceKinds.ConstantOrRule,
});
name: string = "categoryColors";
displayName: string = "Category colors";
slices: Array<FormattingSettingsSlice> = [
this.categoryColor
];
}
export class VisualFormattingSettingsModel extends FormattingSettingsModel {
categoryColorsCard = new CategoryColorsCardSettings();
cards = [this.categoryColorsCard];
}
I don't know how to put parameters to VisualFormattingSettingsModel class in order to fill displayName, value and altConstantSelector fields. In update method I have this :
this.formattingSettings =
this.formattingSettingsService.populateFormattingSettingsModel(
VisualFormattingSettingsModel,
options.dataViews
);
Thanks for help.
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!