如何使用ASP.NET图表控件隐藏图表周围出现的白色边框?
<asp:Chart ID="chtGender" runat="server" BorderSkin-BorderColor="Green" Width="300" Height="350">
<Series>
<asp:Series ChartType="Pie" Palette="EarthTones" ChartArea="MainChartArea">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="MainChartArea" BackColor ="Black" BorderColor = "Black" BorderWidth= "0" Area3DStyle-Enable3D="true">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
答案 0 :(得分:1)
我有同样的问题,无法找到合适的解决方案。 我这样做的方法是将“chartarea”上的borderwidth设置为20,覆盖了饼图周围的白色边框。例如: -
<asp:Chart id="myPieChart" runat="server">
<series>
<asp:Series Name="Series1" ChartType="Pie">
<Points>
<asp:DataPoint YValues="45" />
<asp:DataPoint YValues="34" />
<asp:DataPoint YValues="67" />
</Points>
</asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1"
BackColor="#E6F1FA"
BorderDashStyle="Solid"
BorderWidth="20"
BorderColor="#E6F1FA">
</asp:ChartArea>
</chartareas>
</asp:Chart>