Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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.