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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Problem with importing a customised design JSON

Good morning everyone. I'm experiencing a problem with importing a customized design in Power BI. I've created a short Json-file with color specifications but cannot import it in Power BI. I need to add more properties (font, font size) but even the simpliest one with colors doesn't work. That's my file:

{
"name": "HS",
"dataColors": ["#DA291C", "#FEC900", "#00965E", "#298FC2", "#B00000", "#595959", "#F9AD15", "#127D44", "#00759A", " #FE9A7A", "#999999", "#FFDC38", "#84BF62", "#74B1E8", "#000000"],
"foreground":"#000000",
"foregroundNeutralSecondary": "#000000",
"foregroundNeutralTertiary": "#000000",
"background":"#FFFFFF",
"tableAccent": "#000000"
}

 

Any help would be greatly appreciated! 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

>>I've created a short Json-file with color specifications but cannot import it in Power BI.

I think it should be related to your datacolor setting, it contains invailed hex color string " #FE9A7A":

"dataColors": ["#DA291C", "#FEC900", "#00965E", "#298FC2", "#B00000", "#595959", "#F9AD15", "#127D44", "#00759A", " #FE9A7A", "#999999", "#FFDC38", "#84BF62", "#74B1E8", "#000000"],

I modify your code and add font formatting part into the theme file:

{
   "name":"My Theme",
   "background":"#FFFFFF",
   "foreground":"#000000",
   "foregroundNeutralSecondary":"#000000",
   "foregroundNeutralTertiary":"#000000",
   "tableAccent":"#000000",
   "dataColors":[
      "#DA291C",
      "#FEC900",
      "#00965E",
      "#298FC2",
      "#B00000",
      "#595959",
      "#F9AD15",
      "#127D44",
      "#00759A",
      "#FE9A7A",
      "#999999",
      "#FFDC38",
      "#84BF62",
      "#74B1E8",
      "#000000"
   ],
   "visualStyles":{
      "*":{
         "*":{
            "*":[
               {
                  "fontSize":12,
                  "fontFamily":"Arial"
               }
            ]
         }
      }
   }
}

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

>>I've created a short Json-file with color specifications but cannot import it in Power BI.

I think it should be related to your datacolor setting, it contains invailed hex color string " #FE9A7A":

"dataColors": ["#DA291C", "#FEC900", "#00965E", "#298FC2", "#B00000", "#595959", "#F9AD15", "#127D44", "#00759A", " #FE9A7A", "#999999", "#FFDC38", "#84BF62", "#74B1E8", "#000000"],

I modify your code and add font formatting part into the theme file:

{
   "name":"My Theme",
   "background":"#FFFFFF",
   "foreground":"#000000",
   "foregroundNeutralSecondary":"#000000",
   "foregroundNeutralTertiary":"#000000",
   "tableAccent":"#000000",
   "dataColors":[
      "#DA291C",
      "#FEC900",
      "#00965E",
      "#298FC2",
      "#B00000",
      "#595959",
      "#F9AD15",
      "#127D44",
      "#00759A",
      "#FE9A7A",
      "#999999",
      "#FFDC38",
      "#84BF62",
      "#74B1E8",
      "#000000"
   ],
   "visualStyles":{
      "*":{
         "*":{
            "*":[
               {
                  "fontSize":12,
                  "fontFamily":"Arial"
               }
            ]
         }
      }
   }
}

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Thank you @v-shex-msft  for your solution, it works now. 

Best wishes, 

Tanja 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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