Forum Discussion

LukeB's avatar
LukeB
Icon for Advocate I rankAdvocate I
3 years ago
Solved

How do I increase my line widths in my JSON file

Hello 

I am very new to JSON syntax so I mainly stole this off someone else on google. I currently have the below JSON which presents a tablix in Power BI as I want it too. All I am looking to do is increase the width of the yellow lines at the top and bottom of the tablix(Screenshot below). Is this possible? If so does anyone know how? 

Many Thanks

 

 

 

{  
   "name":"Branding",
   "dataColors":[  
      "#223B47",
      "#FFCB05",
      "#00A5A6",
      "#3B408F",
      "#61A524",
      "#854158"
   ],
   "background":"#FFFFFF",
   "foreground":"#223B47",
   "tableAccent":"#223B47",
   "visualStyles":{  
      "*":{  
         "*":{  
            "*":[  
               {  
                  "fontFamily":"Arial"
               }
            ]
         }
      },
	  "*":{  
            "*":{
               "grid":[
                  {  
                     "outlineColor":{"solid":{"color":"#FFCB05"}},
                     "gridVertical":false,
                     "gridHorizontal":true,
					 "gridHorizontalColor":{"solid":{"color":"E7ECE1"}}
                  }
               ],
               "columnHeaders":[  
                  {  
                     "fontColor":{"solid":{"color":"#223B47"}},
                     "backColor":{"solid":{"color":"#FFFFFF"}},
                     "fontFamily":"Arial"
                  }
               ],
               "values":[  
                  {  
                     "backColorSecondary":{"solid":{"color":"#FFFFFF"}},
					 "fontFamily":"Arial"
                  }
               ]
            }
         }
   }
}

 

 

 

 

 

  • Worked it out by further googling the answer. I needed to add an additional line in the grid section which was:

    "outlineWeight": 2,

     

    This previous post gave me the answer https://community.powerbi.com/t5/Desktop/Custom-Report-Theme-JSON-Property-settings-in-Tables-Matrix/td-p/278177 

    so now my code looks like this

    {  
       "name":"HodgeBranding",
       "dataColors":[  
          "#223B47",
          "#FFCB05",
          "#00A5A6",
          "#3B408F",
          "#61A524",
          "#854158"
       ],
       "background":"#FFFFFF",
       "foreground":"#223B47",
       "tableAccent":"#223B47",
       "visualStyles":{  
          "*":{  
             "*":{  
                "*":[  
                   {  
                      "fontFamily":"Arial"
                   }
                ]
             }
          },
    	  "*":{  
                "*":{
                   "grid":[
                      {  
                         "outlineColor":{"solid":{"color":"#FFCB05"}},
    					 "outlineWeight":3,
                         "gridVertical":false,
                         "gridHorizontal":true,
    					 "gridHorizontalColor":{"solid":{"color":"E7ECE1"}}
                      }
                   ],
                   "columnHeaders":[  
                      {  
                         "fontColor":{"solid":{"color":"#223B47"}},
                         "backColor":{"solid":{"color":"#FFFFFF"}},
                         "fontFamily":"Arial"
                      }
                   ],
                   "values":[  
                      {  
                         "backColorSecondary":{"solid":{"color":"#FFFFFF"}},
    					 "fontFamily":"Arial"
                      }
                   ],
    			   "total":[  
                      {  
                         "fontColor": { "solid": { "color": "#223B47"}},
    					 "fontFamily": "Arial",
    					 "fontSize": 10,
    					 "bold":true
                      }
                   ]
    			
                }
             }
       }
    }

     

1 Reply

  • Worked it out by further googling the answer. I needed to add an additional line in the grid section which was:

    "outlineWeight": 2,

     

    This previous post gave me the answer https://community.powerbi.com/t5/Desktop/Custom-Report-Theme-JSON-Property-settings-in-Tables-Matrix/td-p/278177 

    so now my code looks like this

    {  
       "name":"HodgeBranding",
       "dataColors":[  
          "#223B47",
          "#FFCB05",
          "#00A5A6",
          "#3B408F",
          "#61A524",
          "#854158"
       ],
       "background":"#FFFFFF",
       "foreground":"#223B47",
       "tableAccent":"#223B47",
       "visualStyles":{  
          "*":{  
             "*":{  
                "*":[  
                   {  
                      "fontFamily":"Arial"
                   }
                ]
             }
          },
    	  "*":{  
                "*":{
                   "grid":[
                      {  
                         "outlineColor":{"solid":{"color":"#FFCB05"}},
    					 "outlineWeight":3,
                         "gridVertical":false,
                         "gridHorizontal":true,
    					 "gridHorizontalColor":{"solid":{"color":"E7ECE1"}}
                      }
                   ],
                   "columnHeaders":[  
                      {  
                         "fontColor":{"solid":{"color":"#223B47"}},
                         "backColor":{"solid":{"color":"#FFFFFF"}},
                         "fontFamily":"Arial"
                      }
                   ],
                   "values":[  
                      {  
                         "backColorSecondary":{"solid":{"color":"#FFFFFF"}},
    					 "fontFamily":"Arial"
                      }
                   ],
    			   "total":[  
                      {  
                         "fontColor": { "solid": { "color": "#223B47"}},
    					 "fontFamily": "Arial",
    					 "fontSize": 10,
    					 "bold":true
                      }
                   ]
    			
                }
             }
       }
    }