Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 283
Antoine Aubry Avatar asked Aug 06 '09 22:08

Antoine Aubry


People also ask

How do you change the background color and pattern of a chart?

On the Fill tab, under Background Color, pick the color you want. To use a pattern with two colors, pick a color in the Pattern Color box, and then pick a pattern in the Pattern Style box. To use a pattern with special effects, click Fill Effects, and then pick the options you want.

What is chart control in asp net?

The DevExpress ASP.NET Chart Control offers a comprehensive collection of 2D and 3D charts to meet the data visualization needs of your end users. The ASP.NET Chart Control provides flexible data binding options that allow you to bind to a table from a database or a collection created in code.


1 Answers

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...

like image 97
Jakob Gade Avatar answered Oct 15 '22 18:10

Jakob Gade