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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Card (New) broken JSON settings

I'm in the process of building a theme file in the JSON format.  I was testing setting the "Background" colour found under the "Cards" menu within this JSON file.  Changing the setting in the schema has no effect.  In my examples i've used an obvious colour just to make it clear when it works.

 

Making a manual change to the setting and saving the report into the PBIP format, i can see in the report.json file that this visual does indeed use the same setting that i'm trying to set in my theme file.

 

The setting in question:

RossEdwards_0-1718854104745.png

 

 

Part of my theme file that matters:

"cardVisual":{
	"*":{
		"fillCustom":[{
			"fillColor": {
				"solid": {
					"color": "#A42900"
				}
			},
			"show": true
		}]
	}
}

 

Extract from the Report.Json file for the visual i used for testing where i manually set the background as the colour #A42900

"config": "{\"name\":\"715288314fa7f4280917\",\"layouts\":[{\"id\":0,\"position\":{\"x\":123.8048780487805,\"y\":107.1219512195122,\"z\":13000,\"width\":191.41463414634148,\"height\":93.07317073170732,\"tabOrder\":16000}}],\"singleVisual\":{\"visualType\":\"cardVisual\",\"projections\":{\"Data\":[{\"queryRef\":\"MeasuresTable.FS Variance Goal\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"m\",\"Entity\":\"MeasuresTable\",\"Type\":0}],\"Select\":[{\"Measure\":{\"Expression\":{\"SourceRef\":{\"Source\":\"m\"}},\"Property\":\"FS Variance Goal\"},\"Name\":\"MeasuresTable.FS Variance Goal\",\"NativeReferenceName\":\"FS Variance Goal\"}],\"OrderBy\":[{\"Direction\":2,\"Expression\":{\"Measure\":{\"Expression\":{\"SourceRef\":{\"Source\":\"m\"}},\"Property\":\"FS Variance Goal\"}}}]},\"drillFilterOtherVisuals\":true,\"hasDefaultSort\":true,\"objects\":{\"fillCustom\":[{\"properties\":{\"fillColor\":{\"solid\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#A42900'\"}}}}}},\"selector\":{\"id\":\"default\"}}]},\"vcObjects\":{\"visualTooltip\":[{\"properties\":{\"transparency\":{\"expr\":{\"Literal\":{\"Value\":\"0D\"}}}}}],\"visualHeader\":[{\"properties\":{\"transparency\":{\"expr\":{\"Literal\":{\"Value\":\"0D\"}}}}}],\"visualHeaderTooltip\":[{\"properties\":{\"transparency\":{\"expr\":{\"Literal\":{\"Value\":\"0D\"}}}}}]}}}",
          "filters": "[]",
          "height": 93.07,
          "width": 191.41,
          "x": 123.80,
          "y": 107.12,
          "z": 13000.00

 

As you can see, Power BI assigns the setting to \"fillCustom\":[{\"properties\":{\"fillColor\":{\"solid\":{\"color\":{\"expr\":{\"Literal\":{\"Value\":\"'#A42900'\"} which matches my theme file.  Importing the theme file has no effect on this setting.

 

To head off you most obvious question, the use of 'Reset to default' has been used before loading the theme file to ensure the setting is visible.

 

You will notice in my theme file i've added the "show" as true.  Turning that to false works as intended, showing that the file is indeed setting the correct settings area.

Status: Needs Info

Hi @RossEdwards 

You mean, even if you correctly change the color settings inside the json, applying it to PBI Desktop still doesn't work, right? Did you make the change inside the json file everywhere?

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Needs Info

Hi @RossEdwards 

You mean, even if you correctly change the color settings inside the json, applying it to PBI Desktop still doesn't work, right? Did you make the change inside the json file everywhere?

 

Best Regards,
Community Support Team _ Ailsa Tao

RossEdwards
Solution Sage

@v-yetao1-msft  Yes.  Setting the color in the json file has no impact after importing.

 

"Did you make the change inside the json file everywhere?" I dont understand what you are asking here. This is one specific background setting against 1 specific visual.  There is only 1 place to set this specific setting.  This is not the typical background setting, its a type of background only used by the new card visual.