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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Change background color of chart/graphs titles with Json file

Hey Mates,

 

Does anyone know how to change the background color of the titles of the carts/graphs with a json file?

SergioMontesEY_0-1633038943622.png

I'm trying to change the yellow color and the text color, but I can't find the name element or the property on the json file.

 

Thanks in advance

7 REPLIES 7
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

To change background color of chart/graphs titles, please add a visualStyles section to the JSON file to nest the formatting specifics. Here's a sample:

 

 

{
  "name": "Custom Theme",
  "dataColors": [ "#990011", "#cc1144", "#ee7799", "#eebbcc", "#cc4477", "#cc5555", "#882222", "#A30E33" ],
  "background": "#FFFFFF",
  "foreground": "#ee7799",
  "tableAccent": "#990011",
  "visualStyles": {
    "*": {
      "*": {
        "title": [
          {
            "show": true,
            "fontColor": { "solid": { "color": "#FFFFFF" } },
            "background": { "solid": { "color": "#cc4477" } }
          }
        ]
      }
    }
  }
}

 

vkkfmsft_0-1633416447001.png

 

Referencing: https://www.youtube.com/watch?v=l3389KbpEtA 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi Winniz, thanks for you answer, but for some reason, it is just applying that style for some titles, but, for the ones for the charts/graphs, it didn't work, don't know if I have to add a specific property, it's really odd. This is what I'm getting when I upload your Theme.json file:

SergioMontesEY_0-1633441259846.png

As you can see the titles are still yellow, but the other ones, are pink :(.

 

Thank you so much!

Regards,

 

Sergio Montes



VahidDM
Super User
Super User

G'day Mate,

 

If that's a header of your chart, you can change background and Font in Visualization->Format->Title:

VahidDM_0-1633048231679.png

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!!

 

Anonymous
Not applicable

Hi Vahid,

 

Thank you so much for your answer, but I'm trying to find a property or the name of that element, to change it, with a json file (I'm creating a new theme). Appriciate your time. Have a good one and thanks again.

mahoneypat
Employee
Employee

You can edit it at the visual level under Title in the format options.

 

mahoneypat_0-1633047797831.png

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Hi Mahoneypat,

 

Thank you so much for your answer, but I'm trying to find a property or the name of that element, to change it, with a json file (I'm creating a new theme). Appriciate your time. Have a good one and thanks again.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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