cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

JSON file to set font size to a specific value (for all visuals)

Hi there,

 

I find the default themes come with font sizes too small. I would like to have them larger by default.

I don't know anything about JSON files but reading a bit and looking at a couple of them I put together the following one based on the Twilight theme to set all fonts to size 14. It works quite well and it sets most fonts correctly  but it doesn't change all of them. For instance, I've seen that it doesn't change the font in the filter visual.

Can any of you advise on how to get this to change all font sizes, in all visuals?

 

Many thanks in advance

 

 

{
  "name": "FontSize14+Twilight",
  "dataColors":["#F17925","#004753","#CCAA14","#4B4C4E","#D82C20","#A3D0D4","#536F18","#46ABB0","#F49451","#336C75","#D6BB43","#6F7071","#E0564D","#B5D9DD","#758C46","#6BBCC0","#B55B1C","#00353E","#99800F","#38393B","#A22118","#7A9C9F","#3E5312","#358084","#793D13","#00242A","#66550A","#262627","#6C1610","#52686A","#2A380C","#235658"],
  "background":"#FFFFFF",
  "foreground":"#070f25",
  "tableAccent":"#0F1934",

  "visualStyles": {
    "*": {
      "*": {
        "*": [
          {
            "fontSize": 14
          }
        ]
      }
    }
  }
}

       

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: JSON file to set font size to a specific value (for all visuals)

Hi @AlB

Please look at 

Global Level Template

Adjust titles, backgrounds, report page tooltips, wallpaper, and more for some or all visuals on a page or all pages.

{
	"name": "GlobalLevelTemplate",
	"visualStyles": {
        "*": {
            "*": {
                "title": [{
                    "show": true,
                    "fontColor": { "solid": { "color": "#cc6600" } },
                    "background": { "solid": { "color": "#333333" } },
                    "alignment": "center",
                    "fontSize": 12,
                    "fontFamily": "Verdana"
                }],
                "background": [{
                    "show": true,
                    "color": { "solid": { "color": "#002a5b" } },
                    "transparency": 25
                }],
                "lockAspect": [{
                    "show": true
                }],
                "border": [{
                    "show": true,
                    "color": { "solid": { "color": "#886b01" } }
                }],
                "visualTooltip": [{
                    "type": "Default"
                }],
                "stylePreset": [{
                    "name": "None"
                }]
            }
        },
        "page": {
            "*": {
                "background": [{
                    "color": { "solid": { "color": "#465d85" } },
                    "transparency": 50
                }],
                "outspace": [{
                    "color": { "solid": { "color": "#886b01" } },
                    "transparency": 50
                }]
            }
        }
    }
}

Best Regards

Maggie

3 REPLIES 3
Community Support Team
Community Support Team

Re: JSON file to set font size to a specific value (for all visuals)

Hi @AlB

I learn from github repository , with the following code, i can make the front size as 14 for slicer

3.png

{
  "name": "FontSize14+Twilight",
  "dataColors":["#F17925","#004753","#CCAA14","#4B4C4E","#D82C20","#A3D0D4","#536F18","#46ABB0","#F49451","#336C75","#D6BB43","#6F7071","#E0564D","#B5D9DD","#758C46","#6BBCC0","#B55B1C","#00353E","#99800F","#38393B","#A22118","#7A9C9F","#3E5312","#358084","#793D13","#00242A","#66550A","#262627","#6C1610","#52686A","#2A380C","#235658"],
  "background":"#FFFFFF",
  "foreground":"#070f25",
  "tableAccent":"#0F1934",

  "visualStyles": {
    "*": {
      "*": {
        "*":[
          {
            "fontSize": 14
          }
        ]
      }
    },
    "slicer":{
       "*":    {
				"general": [{
					"outlineColor": { "solid": { "color": "#444444"}},
					"outlineWeight": 1,
					"orientation": "vertical",
					"responsive": true
				}],
				"data": [{
					"mode": "Basic",
					"relativeRange": "",
					"relativePeriod": ""
				}],
				"selection": [{
					"selectAllCheckboxEnabled": false,
					"singleSelect": true
				}],
				"header": [{
					"show": true,
					"fontColor": { "solid": { "color": "#000000"}},
					"background": { "solid": { "color": ""}},
					"outline": "None",
					"textSize": 14,
					"fontFamily": "Segoe UI"
				}],
				"items": [{
					"fontColor": { "solid": { "color": "#000000"}},
					"background": { "solid": { "color": ""}},
					"outline": "None",
					"textSize": 14,
					"fontFamily": "Segoe UI"
				}]
		      }
		}
  }
}

 

 

 

Best Regards

Maggie

 

Super User
Super User

Re: JSON file to set font size to a specific value (for all visuals)

Hi @v-juanli-msft

Thanks a lot for your response and for pointing me to github repository, which looks very interesting.

The solution you propose means addressing the issue for the slicer. If there are other visuals that did not work with my initial code, we would have to do something like what you suggest one by one.  That is a possibility but, is there a way, a piece of code, that sets the font at 14 for each and every visual at once? So that we can forget about individual cases. That's what I was trying to do with the bit in red but it doesn't cover all cases.

Thank you

 

{
  "name": "FontSize14+Twilight",
  "dataColors":["#F17925","#004753","#CCAA14","#4B4C4E","#D82C20","#A3D0D4","#536F18","#46ABB0","#F49451","#336C75","#D6BB43","#6F7071","#E0564D","#B5D9DD","#758C46","#6BBCC0","#B55B1C","#00353E","#99800F","#38393B","#A22118","#7A9C9F","#3E5312","#358084","#793D13","#00242A","#66550A","#262627","#6C1610","#52686A","#2A380C","#235658"],
  "background":"#FFFFFF",
  "foreground":"#070f25",
  "tableAccent":"#0F1934",
  "visualStyles": {
    "*": {
      "*": {
        "*": [
          {
            "fontSize": 14
          }
        ]
      }
    }
  }
}

   

Community Support Team
Community Support Team

Re: JSON file to set font size to a specific value (for all visuals)

Hi @AlB

Please look at 

Global Level Template

Adjust titles, backgrounds, report page tooltips, wallpaper, and more for some or all visuals on a page or all pages.

{
	"name": "GlobalLevelTemplate",
	"visualStyles": {
        "*": {
            "*": {
                "title": [{
                    "show": true,
                    "fontColor": { "solid": { "color": "#cc6600" } },
                    "background": { "solid": { "color": "#333333" } },
                    "alignment": "center",
                    "fontSize": 12,
                    "fontFamily": "Verdana"
                }],
                "background": [{
                    "show": true,
                    "color": { "solid": { "color": "#002a5b" } },
                    "transparency": 25
                }],
                "lockAspect": [{
                    "show": true
                }],
                "border": [{
                    "show": true,
                    "color": { "solid": { "color": "#886b01" } }
                }],
                "visualTooltip": [{
                    "type": "Default"
                }],
                "stylePreset": [{
                    "name": "None"
                }]
            }
        },
        "page": {
            "*": {
                "background": [{
                    "color": { "solid": { "color": "#465d85" } },
                    "transparency": 50
                }],
                "outspace": [{
                    "color": { "solid": { "color": "#886b01" } },
                    "transparency": 50
                }]
            }
        }
    }
}

Best Regards

Maggie

Helpful resources

Announcements
Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 305 members 3,093 guests
Please welcome our newest community members: