Forum Discussion

gggar's avatar
gggar
Helper I
5 years ago
Solved

Infographic Designer Custom Fonts

Hello,

 

I have trouble applying custom fonts to Infographic Designer charts. I tried to upload my PBI theme .json file that uses custom font (Montserrat), but it's not applied in Infographic Designer charts, whereas it's applied to other Page elements.

 

Anyone got suggestions for the fix? Would appreciate any help! Thanks.

6 Replies

  • Hi amitchandak thank you for the reply.

    Yup tried that, imported theme then added the chart.

    Only chart's title got Montserrat applied, the axises still use default font Segoe UI Light.

    Tried to pick Montserrat under Chart, Axis Font Family section, but no luck, it is not an option there.

    Could you give other pointers? Thank you.

     

  • This is the theme .json file I use.
    I overused the Montserrat there though, just to make sure that it hits every options possible.

     

    {
       "name":"Custom Font",
       "visualStyles":{
          "*":{
             "*":{
                "*":[
                   {
                      "fontFamily":"Montserrat"
                   }
                ],
                "legend":[
                   {
                      "fontFamily":"Montserrat"
                   }
                ],
                "categoryAxis":[
                   {
                      "fontFamily":"Montserrat"
                   }
                ],
                "valueAxis":[
                   {
                      "fontFamily":"Montserrat"
                   }
                ]
             }
          },
          "barChart":{
             "*":{
                "categoryAxis":[
                   {
                      "fontFamily":"Montserrat"
                   }
                ],
                "valueAxis":[
                   {
                      "fontFamily":"Montserrat"
                   }
                ]
             }
          }
       }
    }

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi gggar ,

      Please refer the solution in the below thread to update the code of theme file as follow:

      JSON Theme Code for Text Box

      {
         "name":"Custom Font",
         "visualStyles":{
            "*":{
               "*":{
                  "*":[
                     {
                        "fontFamily":"Montserrat"
                     }
                  ],
                  "legend":[
                     {
                        "fontFamily":"Montserrat"
                     }
                  ],
                  "categoryAxis":[
                     {
                        "fontFamily":"Montserrat"
                     }
                  ],
                  "valueAxis":[
                     {
                        "fontFamily":"Montserrat"
                     }
                  ]
               }
            },
            "barChart":{
               "*":{
                  "categoryAxis":[
                     {
                        "show":true,
                        "fontFamily":"Montserrat",
                        "showAxisTitle":false,
                        "titleFontSize":18,
                        "titleFontFamily":"Montserrat"
                     }
                  ],
                  "valueAxis":[
                     {
                        "show":true,
                        "fontSize":14,
                        "fontFamily":"Montserrat",
                        "showAxisTitle":true,
                        "axisStyle":"showTitleOnly",
                        "titleFontFamily":"Montserrat"
                     }
                  ]
               }
            }
         }
      }

      Best Regards

      • gggar's avatar
        gggar
        Helper I

        Hi Anonymous ,

         

        Thanks for the suggestion. Unfortunately, that doesn't work for my Infographic Designer charts.

        I applied your code above, and applied the code written in the mentioned thread as well. Didn't work.

        Tried to import the theme first then after that, I added the Infographic Designer chart, but that didn't work as well.

         

        Also, I think you're referring to Text Box, correct? But what I'm looking for is Infographic Designer chart.

         

        Thank you.