Search code examples
c#asp.netlabelmschart

Long labels appear to be hidden with "..." - MS Chart Pie Graph control


I would like the labels to be completely visible, and if necessary, just spin the pie chart so that the text will fit without being hidden with "...".

Here is an example

Pie graph with "Received" item that has hidden text

Anyone know how to fix this so it is not shortened?

This is the control on my asp page.

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

Thanks.


Solution

  • This time around I think you should have a higher Width value for the Chart.

    This link may be of some help:

    How to: Display Data Point Labels Outside a Pie Chart