Forum Discussion
VizDataLtd
2 years agoHelper I
Formatting pane: line alignment
Hello there, I am upgrading my custom visuals from 2.6 to 5.3 - a massive leap in one go. One thing I can't get to work is the Alignment Group. Within class DataPointCardSettings extend...
- 2 years ago
Hi VizDataLtd
I haven't tried implementing the alignment settings in formatting cards yet, but from looking at the error:
Type {value:string} is not assignable to type "string"
This suggests assigning a string to the value property, not an object. Your reference example shows this, too. I would try amending as follows:
labelAlignment = new formattingSettings.AlignmentGroup({ name: "labelAlignment", displayName: "Label alignment", mode: powerbi.visuals.AlignmentGroupMode.Horizonal, value: "right" // string rather than object });Regards,
Daniel
dm-p
2 years agoSuper User
Hi VizDataLtd
I haven't tried implementing the alignment settings in formatting cards yet, but from looking at the error:
Type {value:string} is not assignable to type "string"
This suggests assigning a string to the value property, not an object. Your reference example shows this, too. I would try amending as follows:
labelAlignment = new formattingSettings.AlignmentGroup({
name: "labelAlignment",
displayName: "Label alignment",
mode: powerbi.visuals.AlignmentGroupMode.Horizonal,
value: "right" // string rather than object
});
Regards,
Daniel