Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello guys and gals
I'm developing a custom visual and I want to have an integer input box for a particular property that can be edited.
So I put this in my capabilities.json:
"objects": {
"visualSettings":{
"displayName": "Visual settings",
"descriptionKey": "visualSettings",
"properties": {
"maxFractionDigits":{
"displayName": "Max fraction digits",
"displayNameKey": "maxFractionDigits",
"type": {
"integer": true
}
}
}
}
}
In my settings objects I have the property defined like this:
public maxFractionDigits: number = 5;
However, when the visual properties panel renders the input box does not show up, only the title does, as you can see here:
As you can see, I also have a bool and a string property and they render correctly as a toggle switch and a text box. It's just the integer property that doesn't render the editor.
What am I doing wrong here?
Solved! Go to Solution.
@Master_T Hmm, well if numeric works and integer does not, could be a bug? Does seem like a valid value according to this: powerbi-visuals-api/schema.capabilities.json at master · microsoft/powerbi-visuals-api (github.com)
You could check the Issues forum here:
https://community.powerbi.com/t5/Issues/idb-p/Issues
And if it is not there, then you could post it.
If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".
@Master_T I think it is supposed to be "numeric" not "integer"
Hello @Greg_Deckler , thanks for your reply.
Using "numeric" works, but it allows the user to input a decimal number, while I would like to only allow integers... is there any way to do that? And why is "integer" one of the allowed values if it is not supported?
@Master_T Hmm, well if numeric works and integer does not, could be a bug? Does seem like a valid value according to this: powerbi-visuals-api/schema.capabilities.json at master · microsoft/powerbi-visuals-api (github.com)
You could check the Issues forum here:
https://community.powerbi.com/t5/Issues/idb-p/Issues
And if it is not there, then you could post it.
If you have Pro account you could try to open a support ticket. If you have a Pro account it is free. Go to https://support.powerbi.com. Scroll down and click "CREATE SUPPORT TICKET".
Thank you, I will open a support ticket then.