Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
bhavesh-jadav
Helper I
Helper I

Up Down Arrow for Numeric Inputs in Custom Visual

Hello there,

 

I want to show up down arrow for numeric field in custom visual just like we have for font-size. I am using following syntax for numeric field

"decimalPlaces": {
   "displayName": "Value Decimal Places",
    "type": {
       "numeric": true
   }
}

Which produces following results.

Capture.PNG

It would be better if we can show arrows for quick value changes. How do I add arrows to this field?

 

1 ACCEPTED SOLUTION

This is a full list of properties that I know about:

  • weight

  • angle

  • textSize

  • fontSize

  • titleFontSize

  • secFontSize

  • secTitleFontSize

  • outlineWeight

  • gridVerticalWeight

  • gridHorizontalWeight

  • barWeight

  • rowPadding

  • cardPadding

  • imageHeight

  • steppedLayoutIndentation

  • borderThickness

  • preferredCategoryWidth

  • strokeWidth

  • gridlineThickness

  • markerSize

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

9 REPLIES 9
v-chuncz-msft
Community Support
Community Support

@bhavesh-jadav,

 

You may try type enumeration.

https://github.com/Microsoft/PowerBI-visuals-tools/blob/master/templates/visuals/.api/v1.13.0/schema...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Power BI has a few hard coded property names that will force PBI to show arrows.

 

What value range are you instrested in? If there's no specific value range we would recommend to keep it as it.

PBI users actually can use Keyboard Arrows to increase/decrease values.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

It is really convenient to click on arrows to adjust the number. Default Power BI visual shows arrows for numeric inputs so I thought end user would expect similar thing in custom visual.

 

Also how do I set range for numeric input? Is there a way to do it in capabilities.json file or do I have to manage it in the code?

What default vsiuals are you talking about?

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Default visuals, for example in card visual to change decimal places you have numeric text box with arrows. Another example is in line and combo charts to adjust stroke width power bi shows numeric text box with arrows.

As mentioned above, Power BI uses special types and hard coded name for such case.

If you wanted to show box with arrow to stroke width you should call your property as: strokeWidth

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

@v-viig Now I understand that I have to used predefined properties name in order to get that arrows and there is no other way as of now. Can you please provide if possible the list of all predefined proerties such as strokeWidth which I can use to get desired settings?

This is a full list of properties that I know about:

  • weight

  • angle

  • textSize

  • fontSize

  • titleFontSize

  • secFontSize

  • secTitleFontSize

  • outlineWeight

  • gridVerticalWeight

  • gridHorizontalWeight

  • barWeight

  • rowPadding

  • cardPadding

  • imageHeight

  • steppedLayoutIndentation

  • borderThickness

  • preferredCategoryWidth

  • strokeWidth

  • gridlineThickness

  • markerSize

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Thank you Ignat for the list.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.