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

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
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.