CsharpMart

<asp:chart id="ContrtaWiseChart" runat="server" backcolor="#F9EFF8" palette="BrightPastel"
 
    width="400px" height="400px" borderdashstyle="Solid" backgradientstyle="TopBottom"
 
    borderwidth="2" bordercolor="181, 64, 1">
 
    <titles>
 
        <asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" ShadowOffset="3"
 
            Text="Contract Wise Employee Count" Name="Title1" ForeColor="26, 59, 105">
 
        </asp:Title>
 
    </titles>
 
    <legends>
 
        <asp:Legend BackColor="#F9EFF8" Alignment="Center" TitleFont="Microsoft Sans Serif, 8pt, style=Bold"
 
            Docking="Bottom" Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False"
 
            Name="Default" Enabled="true">
 
        </asp:Legend>
 
    </legends>
 
    <borderskin skinstyle="Emboss"></borderskin>
 
    <series>
 
        <asp:Series Name="Empcontract" XValueMember="Status" YValueMembers="Total" ChartType="Doughnut"
 
            BorderColor="180, 26, 59, 105" Color="#C19ADD" IsValueShownAsLabel="true">
 
        </asp:Series>
 
    </series>
 
    <chartareas>
 
        <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="White"
 
                BackColor="OldLace" ShadowColor="Transparent" BackGradientStyle="TopBottom" BorderWidth="0">
 
            <Area3DStyle Rotation="15" Perspective="10" Inclination="10" IsRightAngleAxes="False"
 
                WallWidth="0" IsClustered="False" Enable3D="true" PointGapDepth="100" PointDepth="200" />
 
            <AxisY Title="Total Employees" LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
 
                <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />
 
                <MajorGrid LineColor="64, 64, 64, 64" />
 
            </AxisY>
 
            <AxisX Title="Contrtact Status Name" LineColor="64, 64, 64, 64" LabelAutoFitMaxFontSize="8">
 
                <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" IsEndLabelVisible="False" Format="MM-dd" />
 
                <MajorGrid LineColor="64, 64, 64, 64" />
 
            </AxisX>
 
        </asp:ChartArea>
 
    </chartareas>
 
</asp:chart>

For code side:

ContrtaWiseChart.Series["Empcontract"]["DoughnutRadius"] = "40";
ContrtaWiseChart.DataSource = objDataTable;
ContrtaWiseChart.DataBind();

Ebook Download
View all
Learn
View all