Coder Social home page Coder Social logo

powerbi-themetemplates's Introduction

Power BI Theme Templates

Validate JSONs Monitor Document Links

Snippets for assembling Power BI Themes

Get them here or view the visual list below

  • Are you working with Themes in Power BI but confused about the visual formatting options (visualStyles)?
  • Have you struggled while trying to make sense of the Power BI report themes documentation?
  • Do you like JSON?
  • Do you like sample code?
  • Do you like other people doing most of the labor for you?

If you answered "Yes" to any of the questions above, this repo is for YOU!

Sample Power BI Shape Template

Changing colors in Power BI themes is fairly straightforward. For formatting, the wildcard(*) to make universal changes is convenient. If you want to go deeper into individual visual properties, however, it can quickly get confusing. With these sample templates, explore the individual properties available to each visual (as well as shapes and images). Combine the per-visual templates as needed, alter the values to correspond to your own needs, and build your own Power BI theme.

The purpose of this repository is to provide detail-level reference for each native visual in its own separate file. Look at the format options for a visual in Power BI Desktop and compare to the JSON options side by side. Copy and paste what you need from each visual's JSON to assemble a master Theme file.

Please note that the values in these sample files will appear ugly. Many values are not Power BI's defaults. As soon as something worked, I moved on to the next property. Please modify or remove properties in your own theme file to be what you desire.

Global Level Template ๐ŸŒŽ

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

Available Visuals ๐Ÿ“Š

How do you find theme properties? ๐Ÿ”

It's possible to explore a Power BI Desktop file on your local computer to see the properties that are set, even if they aren't documented by Microsoft yet. Check out this great article for a guide on how to extract these properties.

About this repository: โ”

For questions not answered here, you can View the FAQ.
If you have a question or find an issue, you can Create a new issue.

Areas considered "In-Scope" for this repository: โœ…

  1. one global-level theme template to help understand global-level settings.
  2. one template per available visual, covering all default Power BI visuals as well as many custom visuals, to help understand visual-level settings.

Areas considered "Out-of-Scope" for this repository: ๐Ÿšซ

  1. pre-built color themes (You can find these in Microsoft's official themes gallery)
  2. Theme samples to solve specific problems such as adding outlines or hiding visual headers on every visual (You can find these samples in mattrudy/PowerBIThemeSolutions)
  3. JSON file generator for anyone who doesn't want to write their own JSON file (You can use the JSON Generator from PowerBI.Tips)

CI/CD and Automation ๐Ÿค–

There are several helpful levels of automation that help this project stay valid over time.

When someone new adds an Issue or Pull Request to the project:

Link to Action Description
Housekeeping - Welcome New Contributors They are greeted, thanked, and pointed to helpful links

When a template or file is added/edited:

Link to Action Description
Validate Docs Any hyperlinks are tested to make sure they are valid
Validate JSONs Any JSON files are scanned to make sure they are valid

Every 12 hours:

Link to Action Description
Monitor RSS Microsoft's blog feed is scanned to check for a new Power BI Monthly Update, and if there is an issue is created to check for new visuals or properties.

Once a week:

Link to Action Description
Monitor Docs All hyperlinks on all pages are checked to make sure no links have broken

Contributors ๐Ÿ‘ฉโ€๐Ÿ”ฌ

This project is only possible thanks to the contributions of the community - below is a small set of the people who have made this possible! We're also very thankful to everyone who's written blog posts with useful samples, created issues, or suggested enhancements to this repository, or helped spread the word about this resource! Want to see your name in this list? Check out the 'How Can I Contribute' section in the Contribution Guidelines to get started!

Contribution list made with contrib.rocks.

powerbi-themetemplates's People

Contributors

7samat avatar aaronsteers avatar deldersveld avatar easynoise avatar igorya76 avatar kevinzous avatar lavinavrovine avatar mattrudy avatar mikecarlo avatar nexus150 avatar nghtchld avatar oscarvalerock avatar rafaelmpsantos avatar sohamparate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powerbi-themetemplates's Issues

Filled Map - Data Colors

Source: Cloned from Issue 6 in original repository.

Research options under Data Colors for Filled Map

Segoe UI Bold font family does not work [Resolved]

I was trying to set the column headers in a table as Segoe UI Bold. Surprisingly, everything Segoe works, except for Segoe UI Bold. It turns out, if you want to set Segoe UI Bold, you have to use the font family as following:

"fontFamily": "wf_segoe-ui_bold"

Multi-visual template not working as expected

Source: Cloned from Issue 32 in original repository.

I am trying to merge Slicer, text box and shape codes together but only first code works and other two does not make any changes when I apply them. Also I get a message of success every time I apply. Can anyone help what I missing here

Add Global Color Formatting to Global Template

Global colors can be set in 3 ways:

Data Colors - the color palette that will be available and used by default for all visuals

Other Theme Colors - the colors that will be used to express data states across your reports, including:

  • good
  • neutral
  • bad
  • maximum
  • center
  • minimum
  • null

Structural Colors - the colors that will affect all other visual elements like labels, gridlines, outlines, backgrounds, etc., including:

  • firstLevelElements
  • secondLevelElements
  • thirdLevelElements
  • fourthLevelElements
  • background
  • secondaryBackground
  • tableAccent

More reading can be done here:
Data Colors and Theme Colors: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes#setting-theme-colors
Structural Colors: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes#setting-structural-colors

set KPI goal text color with JSON theme

Source: Cloned from Issue 33 in original repository.

I am trying to set the font color for the text in the Goals section of the KPI visual.
image

I am struggling because I can;'t figure out how the property is called: I tried fontColor, color, labelColor to no avail.
Is it documented anywhere?

Thanks

Slicer - Enable Search

Source: Cloned from Issue 5 in original repository.

Determine if there is a way to automatically enable Search in the Slicer

New set of Shapes need to be tested with current Shape Theme

Source: Cloned from Issue 63 in original repository.

Current Shape Theme visualStyle is 'basicShape', other visualStyle values seen include 'shape'

Follow-up from jujiro:
I played around with Shape JSON. It worked only when I renamed "basicShape" to "shape". I also noticed that the shape JSON was unable to set the line thickness (weight) and the color. Since the line weight is adjusted in the outline section, perhaps a new section needs to be added to this JSON. I tried various names, to no avail.

dropShadow won't be applied in power bi service

Source: Cloned from Issue 31 in original repository.

Hi. I have tried this json and a custom one over different reports and workspaces. The thing is that the shadow of the visualizations only change in power bi desktop. After you publish them to Service, the reports won't have any shadow at all. Do you know something about it?

KPI - kpiFormat

Source: Cloned from Issue 1 in original repository.

kpiFormat is mentioned under Indicator in documentation but option does not appear in UI

Stacked Column - Title Color

In the valueAxis section of the Stacked Column visual, the "color" property should be changed to "titleColor".

As an aside: thank you for creating a fork of this repository! You're the best.

Slicers - Missing theme setting for search box background

Source: Cloned from Issue 18 created by @aaronsteers in the original repository.

Part 1
I'm not sure if this is a missing setting or missing configurability on the Power BI product side.

Currently, the background color for a slicer search box is always "white" (#ffffff) and the search box text color appears to be pulled from the top-level theme "foreground" setting - which for a dark mode is likely also "white". The result is a white-on-white search box that isn't readable - and worse, if typed in by the user creates an invisible filter against the slicer's context.

The only workaround I have found is to completely disable search boxes in slicers and then hope the user does not re-enable them. This is especially painful for "dark mode" themes (my use case) but it may be affecting others as well.

Any assist or workaround would be greatly appreciated. Thanks!

Part 2
Related: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/38574625-enable-setting-the-background-of-search-box-in-sli

Part 3
Temporary workaround is to use a non-white color (blue in the below example) for the "label" text class.

Example:

{
 "name": "sample theme snippet",
  "textClasses": {
    "label": {
      "fontSize": 12,
      "fontFace": "Segoe UI",
      "color": "#c2d8fe"
    }
  }
}

Part 4
Update: When setting the "label" text class, this also overrides the default text box color - which also appears to not be independently configurable. It would therefor be helpful to know if there's also a way to override the default font color for text boxes. (The repo here shows a sample to override the background color but not the default text color for text boxes.)

Settings for visual header

Source: Cloned from Issue 21 in original repository.

Hello,
thank you so much for this example repository. It is so much better, than the official Microsoft documentation and saved me a lot of frustration.

The only thing I could not find in here were the granular settings for the visual header, so I analyzed the Power BI Service and found these settings. Maybe you can add them somewhere around here?
This is what I found out (see below). I did use the "background" part, as well as the "showFilterRestatementButton", which is basically the Filter Icon. I also used "showDrillToggleButton", which is the icon that enables drill down on double click. I hope it will help others.

"visualHeader": [
      {
          "show": true,
          "background": {
              "solid": {
                  "color": "#0081C7"
              }
          },
          "foreground": {
              "solid": {
                  "color": "#558100"
              }
          },
          "transparency": 50,
          "showCommentButton": true,
          "showCopyVisualImageButton": true,
          "showDrillDownExpandButton": true,
          "showDrillDownLevelButton": true,
          "showDrillRoleSelector": true,
          "showDrillToggleButton": true,
          "showDrillUpButton": true,
          "showFilterRestatementButton": true,
          "showFocusModeButton": true,
          "showOptionsMenu": true,
          "showPersonalizeVisualButton": true,
          "showPinButton": true,
          "showSeeDataLayoutToggleButton": true,
          "showVisualErrorButton": true,
          "showVisualHeaderTooltip": false,
          "showVisualInformationButton": true,
          "showVisualWarningButton": true
      }
  ]

Include Theme Color Palette

Source: Modified from Issue 22 in original repository.

Would be great to be able to change the default colors that appear on the Power BI desktop color palette selection.

Response by @glitteryqueen:

You can easily do that either by entering the Theme section on your Power BI or with a JSON like:

{ 
    "name": "newcolors, 
    "dataColors": ["#74b9ff", "#0984e3", "#fd79a8", "#fab1a0", "#fdcb6e", "#d63031", "#2d3436", "#55efc4"],
    "background":"#FFFFFF",
    "foreground": "#747480",
    "tableAccent": "#FFFFFF"
}

You just set up 8 different colors for your data set, and the background, foreground and table accent.

Visual Header Defaults in JSON

Source: Cloned from Issue 66 in original repository.

I need help to format the visual headers for slicers in my JSON theme; I need them to default to off but only for slicers.

Shape Map - not working

Source: Cloned from Issue 10 created by @KDIXN in original repository.

The shapeMap doesn't seem to work. Is it outdated?
I would like to see values to force the 'minimum' and 'maximum' colours

Button JSON is probably missing properties

Source: Cloned from Issue 68 in original repository.

It shall probably be possible to configure the outline for all the States: Default state, On hover, on press, Disabled

labelDisplayUnits

Source: Cloned from Issue 4 in original repository.

Figure out how this actually works to get thousands, etc.

Ribbon - Spacing

Source: Cloned from Issue 3 in original repository.

Find correct property name for Spacing on the Ribbon chart.

Theme for shape

Source: Cloned from Issue 24 in original repository.

Hi,
Json theme for shape is not working. Can you please update the code or provide me a fix for it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.