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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Custom Theme Preview for Visuals: Visual Name for Matrix?

Using the Sept 2017 PBI Desktop, with custom theme preview...

 

I am trying to apply a default theme for a matrix.  The visual name of "matrix" does not seem to work.

 

Here is an excerpt of my theme JSON file:

 

----------------------------------------------------

  "tableEx":{
   "*":{
    "*":[{
     "fontSize":20
    }]
   }
  }


,


  "matrix":{
   "*":{
    "*":[{
     "fontSize":20
    }]
   }
  }


,

 

----------------------------------------------------

 

The format for "tableEx" is applied.  but the format for matrix is not applied.  There is no "matrixEx" visual, I think.  Is this a known limitation?

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

maybe one of the mysteries of naming things ...

 

The name you have to use for the matrix visual is pivotTable:

"pivotTable": {
			"*": {
				"rowHeaders": [{
					"fontSize":14
				}],
				"columnHeaders": [{
					"fontSize":14
				}],
				"values": [{
					"fontSize":12
				}]
			}
		}

Regards

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

7 REPLIES 7
TomMartens
Super User
Super User

Hey,

 

maybe one of the mysteries of naming things ...

 

The name you have to use for the matrix visual is pivotTable:

"pivotTable": {
			"*": {
				"rowHeaders": [{
					"fontSize":14
				}],
				"columnHeaders": [{
					"fontSize":14
				}],
				"values": [{
					"fontSize":12
				}]
			}
		}

Regards

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

How do you know that? The documentation says there is a visual called "matrix". Do you have a more complete set of documentation? I'm trying to change the font color (of anything!) and I cannot seem to do it. fontColor, color don't seem to work.

 

{
  "name": "test",
  "dataColors": [ "#FC9425", "#33C6BB"],
  "background": "#293537",
  "foreground": "#6B7A8F",
  "tableAccent": "#6B7A8F",
  "visualStyles": {
    "card": {
      "*": {
        "labels": [
          {
            "fontSize": 30,
            "color": "#FFFFFF"
          }
        ],
        "categoryLabels": [
          {
            "fontSize": 16
          }
        ]
      }
    }

  }
}

Hey @LeahSQL,

 

unfortunately I do not have a more complete set of documentation. The documentation also states that there is a visual called "pivotTable". I wanted to change the "Matrix" visual, because matrix, didn't work I tried promising visuals, and pivotTable worked - that simple.

 

Regards

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Thanks Tom!  If I went down the list one by one I would have found it eventually.  Thanks for the time savings and for pointing me in the right direction!

In case anyone is wondering, you can set the font color, the syntax is like this:

  "visualStyles": {
    "*": {
      "*": {
        "*": [
          {
            "fontSize": 10,
            "fontFamily": "Segoe UI",
            "color": { "solid": { "color": "#E6E6E6" } }
          }
        ]
      }
    }
  }

There's a great tool for creating custom themes here: https://powerbi.tips/tools/report-theme-generator-v3/

Thank you to Adam Harper from PowerDAX for pointing it out!

Anonymous
Not applicable

Glad the theme generator was updated!  Thanks for the tip!

 

What did you refer to to figure out the syntax of  "color": { "solid": { "color": "#E6E6E6" } } ???  That's not in the reference material that was published along with the September update.

I know! It would be really great if the documentation were more complete. I mined it out of the file produced by the theme generator.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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