MSCHART with a transparent background

久未见 提交于 2021-02-11 15:01:18

问题


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


回答1:


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;



回答2:


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.




回答3:


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

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


来源:https://stackoverflow.com/questions/6633688/mschart-with-a-transparent-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!