Antoine Aubry
Antoine Aubry

Reputation: 12459

How do I change the background color of an ASP.NET chart control?

When the chart control is rendered, the background color of the image is white. How can I make it another color (or transparent)?

The area I am referring to is the white area between the black border and the chart background.

Upvotes: 9

Views: 13320

Answers (1)

Jakob Gade
Jakob Gade

Reputation: 12419

Try this:

<asp:Chart id="Chart1" runat="server">
  <BorderSkin BackColor="Transparent" PageColor="Transparent" 
    SkinStyle="Emboss" />
</asp:Chart>

The BorderSkin.PageColor and BorderSkin.BackColor properties should do the trick...

Upvotes: 18

Related Questions