【问题标题】:Long labels appear to be hidden with "..." - MS Chart Pie Graph control长标签似乎用“...”隐藏 - MS Chart Pie Graph 控件
【发布时间】:2010-06-07 22:46:42
【问题描述】:

我希望标签完全可见,如有必要,只需旋转饼图,以便文本适合而不被“...”隐藏。

这是一个例子

有人知道如何解决这个问题,所以它不会缩短吗?

这是我的asp页面上的控件。

<asp:CHART ID="Chart1" runat="server" 
    BorderColor="181, 64, 1" BorderDashStyle="Solid" BorderWidth="2" Height="371px" 
    ImageLocation="~/TempImages/ChartPic_#SEQ(300,3)" ImageType="Png" 
    Palette="None" Width="693px" 
    BorderlineColor="">
        <legends>
            <asp:Legend BackColor="Transparent" Enabled="False" 
                                    Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="True" Name="Default">
            </asp:Legend>
        </legends>
        <series>
            <asp:Series ChartArea="ChartArea1" ChartType="Pie" Legend="Default" 
                Name="Series1" 
                CustomProperties="PieLabelStyle=Outside, PieDrawingStyle=Concave"  
                YValuesPerPoint="6" Font="Trebuchet MS, 8.25pt, style=Bold">
                <SmartLabelStyle AllowOutsidePlotArea="No" MaxMovingDistance="100" />
            </asp:Series>
        </series>
        <chartareas>
                        <asp:ChartArea BackColor="#DEEDF7" BackGradientStyle="TopBottom" 
                                    BackSecondaryColor="White" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" 
                                    Name="ChartArea1" ShadowColor="Transparent">
                            <Area3DStyle Enable3D="True" IsRightAngleAxes="False" />
            </asp:ChartArea>
        </chartareas>
    </asp:CHART>

谢谢。

【问题讨论】:

    标签: c# asp.net label mschart


    【解决方案1】:

    这一次我认为您应该为图表设置更高的宽度值。

    此链接可能会有所帮助:

    How to: Display Data Point Labels Outside a Pie Chart

    【讨论】:

    • Hey Leniel :P,我给了它一个更高的宽度值,是的,这行得通……但我只有 700px 可以使用。有没有其他办法?
    • @Mike:您可以缩短标签。这是我能想到的唯一方法。
    • 在 3d 属性上设置新的旋转数会旋转图形并重新定位文本。如果我能找到一种方法来检查标签是否会被缩短,我可以更改轮换数,直到标签不会被缩短
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多