cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
michal089
Frequent Visitor

How to change fontSize capability limits.

Hi,

 

I have following problem: i can't define limits of the fontSize  (apparently the upper one is 40 and the lower is 8). Additionaly I have not got a slider beside the input number:

 

Capabilities

 

My capabilities.json :

 

 

 "objects": {
        "customProperties": {
            "displayName": "Custom Properties",
            "properties": {
                "title": {
                    "displayName": "Title",
                    "type": { "text": true }
                },
                "rotation": {
                    "displayName": "Rotation",
                    "type": { "numeric": true }
                },
                "textSize": {
                    "displayName": "Text Size",
                    "type": {
                        "formatting": {
                            "fontSize": true
                        }
                    }
                }
                
                }
            }
    }

 

 

My settings.ts:

 

 

import DataViewObjectsParser = powerbi.extensibility.utils.dataview.DataViewObjectsParser;

export class VisualSettings extends DataViewObjectsParser {
  public customProperties: customPropertiesData = new customPropertiesData();
}
export class customPropertiesData {
  public title: string = "Title";
  public rotation: number = 0;
  public textSize: number = 100;
}

 

Anyone knows a solution? I would be grateful.

 

Michal

9 REPLIES 9
Moderator v-viig
Moderator

Re: How to change fontSize capability limits.

Please rename textSize inti something else. For example: "fontSizeValue".

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

michal089
Frequent Visitor

Re: How to change fontSize capability limits.

Ok, now I have sth like this:

"fontSizeValue": {
    "displayName": "Text Size",
    "type": {
        "formatting": {
            "fontSize": true
        }
    }
},

And the output is:

 

 

 

-Secondly, is there any option to leave data fields empty and eventually remove dataRoles from capabilities.json ? I am working on a totally static visual that doesn't need any data besides that entered with objects (Format tab). And my Visual is not updating unless I feed it with some data.

 

Thanks for the reply!

Michal

Moderator v-viig
Moderator

Re: How to change fontSize capability limits.

You should use numeric type instead of fontSize as well.

 

As far as I know, Power BI does not allot to use Custom Visuals w/o filled data fields.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

michal089
Frequent Visitor

Re: How to change fontSize capability limits.

Ok, but now I have just regular input field:

 fontsize1.JPG

 

And the key goal is to get that fancy field with up/down arrows .

 

Michal

Moderator v-viig
Moderator

Re: How to change fontSize capability limits.

There's no way to override limits and keep arrows to increase/decrease values.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

samuelr2019
Frequent Visitor

Re: How to change fontSize capability limits.

Hi, would you be able to publish the code required to achieve this result please.

 

I'm trying to produce a visual for a 55" TV in the office and the max font size of 40 on the card visual just isn't enough.

 

Any help would be greatly appreciated!

Highlighted
Microsoft v-evelk
Microsoft

Re: How to change fontSize capability limits.

Hi,

 

Please check an April release of PowerBi Desktop that will be delivered soon.

 

Kind Regards,

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

samuelr2019
Frequent Visitor

Re: How to change fontSize capability limits.

Thanks Evgenii, I look forward to it!

Microsoft v-evelk
Microsoft

Re: How to change fontSize capability limits.

Btw, you can try 

type:{ integer: true} in capabilities
and something like the following:
 
validValues: {
  yourFieldName: {
    numberRange: {
      min: 10,
      max: 100
   } 
  }
}
Kind Regards,
 
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com
 

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors