Rad
Rad

Reputation: 4921

MSCHART with a transparent background

Any whay to make the background transparent of the MSCHART? thank's

Upvotes: 0

Views: 8943

Answers (3)

Jabes Munoz
Jabes Munoz

Reputation: 1

This worked perfectly for me, HolesChart is the name of my Chart

HolesChart.ChartAreas["ChartArea1"].BackColor = Color.Transparent;

Upvotes: 0

Conor
Conor

Reputation: 1057

You need to set the Chart background colour AND the ChartArea colour.

Chart c = new Chart();

c.BackColor = Color.Transparent;

c.ChartAreas.Add(new ChartArea("ChartArea1"));
c.ChartAreas[0].BackColor = Color.Transparent;

Upvotes: 5

Pablo Johnson
Pablo Johnson

Reputation: 1072

maybe this help you

in your .aspx file where your chart code is, look for the asp:ChartArea tag. then add BackColor = "Transparent".

<asp:ChartArea Name="ChartArea1" BackColor="Transparent" 
            </asp:ChartArea>

Hope this help.

Upvotes: 0

Related Questions