Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
I have an issue with creating a custom visual in which I need to be able to set 2 different font sizes from the property pane. The issue is that the first font size control is a slider which allows values from 8-40 whereas subsequent controls allow 0-100 percent.
I can show this using the basic new visualisation
pbiviz new fontVisual
npm install
Then edit capabilities.json to include a second font size property (in this case "fontSize1")
}, "fontSize": { "displayName": "Text Size", "type": { "formatting": { "fontSize": true } } }, "fontSize1": { "displayName": "Text Size 1", "type": { "formatting": { "fontSize": true } } }
Update settings.ts to include the new property
// Text Size public fontSize: number = 12; public fontSize1: number = 12;
Then build and run
pbiviz start
This is the result
Is this the expected behaviour? Or is the second font size meant to be a percentage of the first? If not, Is there any way I can make them the same control?
Thanks
Solved! Go to Solution.
Hello @saviourofdp
The fontSize is predefined Power BI capabilities name.
You might try to rename the second fontSize property to textSize, titleFontSize, secFontSize, secTitleFontSize.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |