Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I try to develop the Custom Visual and I want to upload the image file for visual background image.
But I can not understand coding to upload the image file by visualize formatting.
Please tell me the code.
This my code.
setting.ts
------------------------------------------------------------
// Background Image
export class BgImageSettings extends FormattingSettingsCard {
public bgImage = new formattingSettings.ImageUpload({
name: "bgImage",
displayName: "Image File",
value: null,
visible: true
});
name: string = "bgCard";
displayName: string = "Background";
analyticsPane: boolean = false;
visible: boolean = true;
slices: Array<FormattingSettingsSlice> = [this.bgImage];
}
------------------------------------------------------------
capabilities.json
------------------------------------------------------------
"objects": {
"bgCard": {
"properties": {
"bgImage": {
"type": {
"text": true
}
}
}
},
------------------------------------------------------------
When I run the Custom Visual and upload the image file,
the charactor type is entered in the variable that contains "visualSettings.bg.bgImage.value".
Please show blow image.