Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Unable to enable background show via JSON theme

Hi all,

 

I have been building a JSON theme recently, and at one point when loading the theme I accidentally hit a template theme that disabled the background on charts.

 

When I have then gone to import my theme it has changed everything except the background on the charts, which have all remained switched off. Furthermore when i switch them on they show as the default tranparency 50% even though I have explicitly stated in the file for it to be 0 - here is the JSON code I am using - am i missing something?

	"hundredPercentStackedBarChart":
		{"*":
			{													
			"background": 	[{
						"show": true,
						"color": {"solid": {"color": "#FFFFFF"}},
						"transparency": 0
						}]

 ( the JSON file is much larger but I have just pasted the relevant part - also the issue persists for every visual and the code remains the same on each one)

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

    You can try the following forms:

    " hundredPercentStackedBarChart": {
                     "*": {
                    "background": [{ "show": {
                            "expr": {
                                "Literal":{
                                    "Value": "true"
                                }
                            }
                        },
                    "color": { "solid": { "#FFFFFF" } },
                    "transparency": 0
                }]

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Liu Yang,

       

      Thanks for your suggestion, I have tried this and it loads into the report OK but unfortunately does not work for turning on the background of the visual.