Anychart: Change background colour

0
Hi, I am using the Anychart Mendix Marketplace module to create a Pie chart. For some reason the background of all Anychart charts is light gray. I don’t know if this is styling from a theme on my mendix app but I want them to be transparent (same colour as my background). I have used a demo anychart widget and it has the same background colour so I know it’s nothing to do with my code. I have already tried every combination of settings in the layout/data code on the anychart widget none of the options I have tried seemed to have any impact. Any ideas on where I should look to set the paper/plot colour to transparent? Thanks in advance,  
asked
2 answers
0

The fill() method allow to set opacity. https://api.anychart.com/v8/anychart.core.ui.Background#fill

answered
0

This should work:

{
    "plot_bgcolor": "rgba(0,0,0,0)",
    "paper_bgcolor": "rgba(0,0,0,0)",
    "font": {
        "family": "Open Sans, sans-serif",
        "size": 12,
        "color": "#FFF"
    },
    "autosize": true,
    "showlegend": false,
    "hoverlabel": {
        "bgcolor": "#fff",
        "bordercolor": "#fff",
        "font": {
            "color": "#FFF"
        }
    },
    "legend": {
        "font": {
            "family": "Open Sans",
            "size": 14,
            "color": "#555"
        }
    },
    "margin": {
        "l": 60,
        "r": 60,
        "b": 60,
        "t": 10,
        "pad": 10
    }
}

 

answered