Forum Discussion
Microsoft Gantt, custom theme styling
I currently am attempting to create a custom theme that targets the Microsoft Gantt visual. I am generally using a Dark Theme and want to utlize my custom theme.json to make it easier for users to implement the visualization.
Has anyone had any luck doing something like this? For instance, I want to change the background color of the Category Labels, and set axis colors and legend label colors by default.
I can't seem to target the appropriate properties to make this happen. I appreciate any help anyone can give.
Hi mcriv
You can customize/import themes on the report level.Please refer to the linked guides :
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes
https://www.youtube.com/watch?v=tX0AOy18JDA
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
In your custom theme.json file, define the properties you want to customize for the Gantt chart. For example, you can set the background color for category labels, axis colors, and legend label colors.
{ "name": "Custom Gantt Theme", "dataColors": [ "#FF5733", // Data color 1 "#0088FF" // Data color 2 ], "visualStyles": { "*": { "categoryLabels": { "background": "#333", // Change the background color of category labels "color": "#FFF" // Change the text color of category labels }, "axis": { "grid": { "color": "#888" // Change the axis grid color } }, "legend": { "title": { "color": "#555" // Change the legend title color } } }, "gantt": { // Customize Gantt chart-specific properties here } } }Keep in mind that not all visual properties may be customizable through themes. If there are specific properties that you cannot customize through themes, you may need to explore other options, such as using custom JavaScript or CSS to style the Gantt chart in Power BI further.
3 Replies
- AmiraBedh
Super User
In your custom theme.json file, define the properties you want to customize for the Gantt chart. For example, you can set the background color for category labels, axis colors, and legend label colors.
{ "name": "Custom Gantt Theme", "dataColors": [ "#FF5733", // Data color 1 "#0088FF" // Data color 2 ], "visualStyles": { "*": { "categoryLabels": { "background": "#333", // Change the background color of category labels "color": "#FFF" // Change the text color of category labels }, "axis": { "grid": { "color": "#888" // Change the axis grid color } }, "legend": { "title": { "color": "#555" // Change the legend title color } } }, "gantt": { // Customize Gantt chart-specific properties here } } }Keep in mind that not all visual properties may be customizable through themes. If there are specific properties that you cannot customize through themes, you may need to explore other options, such as using custom JavaScript or CSS to style the Gantt chart in Power BI further.
- Ritaf1983
Super User
Hi mcriv
You can customize/import themes on the report level.Please refer to the linked guides :
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes
https://www.youtube.com/watch?v=tX0AOy18JDA
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- mcrivNew Member
I have been making a custom theme based on that guidance. My particular issue is with the Gantt Visualization. Some global styles apply, but I am looking to style specific elements within this visualization.
https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa104380765?tab=overview