0

如何使用 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>
4

1 回答 1

1

我有同样的问题,找不到合适的解决方案。我这样做的方法是将“chartarea”上的边框宽度设置为 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>
于 2012-07-26T11:05:22.370 回答