Set container background

I would like to set the background of the ChartArea and the rectangle that contains the Chart Area

The ChartArea I can do with the ChartArea object (Below)

public chartArea : Object = {

border: {

width:0

},

background-color: #fff

}
Now the chart area is often within an div rectangle that is added automatically when the Chart is added.
How do I set the background for the Rectangle area that contains the ChartArea.

Thanks

Jawahar


1 Reply

SB Swetha Babu Syncfusion Team June 2, 2022 04:46 AM UTC

Hi Jawahar,


Greetings from Syncfusion.


We can set the container background color by using the background property in chartArea. We have created a simple angular application to achieve your requirement. Please find the below stackblitz link for your reference.


Sample link: https://stackblitz.com/edit/angular-5xp947?file=app.component.ts


Code Snippet:


public chartArea: Object = {

    border: {

                             width: 0

    },

    background: "aqua"

};


Screenshot:



Kindly, revert us if you have any concerns.


Regards,

Swetha


Loader.
Up arrow icon