PowerBI-tips / tools

General Repo for tracking features, issues and bugs related to the tools developed by PowerBI.tips
3 stars 0 forks source link

Issue - Properties Are Merging In Theme Tool when should be Separate Properties (Global) #2

Closed pugliathomas closed 1 year ago

pugliathomas commented 1 year ago

Currently, there seems to be missing properties, or if they are there, ambiguous names or they are controlling the wrong items.

For Example, trying to set the background globally for visuals and the background of the canvas (page).

Going through the UI, I can find a global background (top level) which I do not know if it this for visuals or the page.

I have searched each major property for canvas or page background, but cannot find it. It should be logically under Canvas Background but that does not seem to exist.

Example of Problem

  1. I need to have for every page a color and transparency (Fig 1)
  2. In Themes UI, no clear property for Canvas Background, but a global background. (Fig 2)
  3. I have searched for page and canvas settings but it does not seem to be available in Themes Tool.
  4. If i enable and set a color for the global background property, it does the following:
    1. Enables the background for all visuals
    2. Enables the page background the same
  5. So this global property in Tool is tied to both properties.

See image from Power BI after importing the theme (enabled from above):

image

Fig 1

image

Fig 2

image

Code from Download / Export:

"visualStyles": {
    "*": {
      "*": {
        "background": [
          {
            "color": {
              "solid": {
                "color": {
                  "expr": {
                    "ThemeDataColor": {
                      "ColorId": 0,
                      "Percent": 0
                    }
                  }
                }
              }
            },
            "show": true,
            "transparency": 0
          }
        ],

Needed JSON / Property for Just Page Background

"page": {
            "*": {
                "background": [
                    {
                        "color": {
                            "solid": {
                                "color": "#E2E2E2"
                            }
                        }
                    }
                ]
            }
        }
MikeCarlo commented 1 year ago

The page property has been added.

when using global properties it sets it everywhere, no matter the layer. if you want all visuals to have a different background, you'd have to set that for each visual.