Background
To enable and configure the background of the legend, combine the legend() method of the chart with background() and methods of the anychart.core.ui.Background class. You can adjust the fill, stroke, and corners:
// configure the background of the legend
var background = chart.legend().background();
background.enabled(true);
background.fill("#96a6a6 0.3");
background.stroke("#96a6a6");
background.cornerType("round");
background.corners(10);