Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8735341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:01:56+00:00 2026-06-13T10:01:56+00:00

The following is the code: ASPX code <asp:Chart ID=Chart1 runat=server Width=414px Height=396px BackColor=Transparent Palette=SeaGreen>

  • 0

The following is the code:
ASPX code

<asp:Chart ID="Chart1" runat="server" Width="414px" Height="396px" BackColor="Transparent"
            Palette="SeaGreen">
            <Series>
                <asp:Series Name="Education" XValueMember="State" YValueMembers="Education" IsVisibleInLegend="true"
                    ChartType="Pie" Color="255, 255, 128">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1" Area3DStyle-Enable3D="true">
                    <AxisX LineColor="DarkGray">
                        <MajorGrid LineColor="LightGray" />
                    </AxisX>
                    <AxisY LineColor="DarkGray">
                        <MajorGrid LineColor="LightGray" />
                    </AxisY>
                    <Area3DStyle Enable3D="True" WallWidth="5" LightStyle="Realistic"></Area3DStyle>
                </asp:ChartArea>
            </ChartAreas>
            <Legends>
                <asp:Legend>
                </asp:Legend>
            </Legends>
        </asp:Chart>

CS code

var table = new DataTable();

table.Columns.Add("State", typeof(string));
table.Columns.Add("Education", typeof(long));

table.Columns.Add("Lbl");
var row = table.NewRow();
row["State"] = "Gujarat";
row["Education"] = 791;

table.Rows.Add(row);
row = table.NewRow();
row["State"] = "Delhi";
row["Education"] = 978;
table.Rows.Add(row);

row = table.NewRow();
row["State"] = "Panjab";
row["Education"] = 1650;
table.Rows.Add(row);

Chart1.DataSource = table;
Chart1.DataBind();

My issue is i want to display different values in legends and different in the actual piechart area labels. How can i do it?

I tried various combinations, but did not get through al i want is the legends should contain values from one column and pie chart values from another column. Here is a picture of what exactly i want
enter image description here

Column Education contains integer values which i want to display in the chart area.

kindly help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:01:57+00:00Added an answer on June 13, 2026 at 10:01 am

    Set the Series property to IsValueShownAsLabel="true"

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've the following code in aspx page <asp:Label ID=CittaLabel runat=server Text='<%# Eval(Citta) %>' Font-Size='<%#
I have the following code in my aspx page: <asp:Button runat=server ID=myButton Text=hello />
I have the following aspx code; <asp:GridView ID=GridView1 runat=server AllowPaging=True AllowSorting=True AutoGenerateColumns=False DataKeyNames=ProductId DataSourceID=edsinventory
I have the following ASPX code: <asp:ScriptManager ID=ScriptManager1 runat=server /> <asp:UpdatePanel runat=server ID=UpdatePanel UpdateMode=Conditional>
i have the following loginview code in my site.master design <asp:LoginView ID=HeadLoginView runat=server EnableViewState=false>
I have the following multiview set up in my aspx page: <asp:MultiView id=MultiView1 runat=server
I need help on this following aspx code aspx Code: <asp:Label ID =lblName runat
I have following code: <asp:Button ID=InsertButton runat=server CausesValidation=True CommandName=Insert Text=Add Form PostBackUrl=~/APPLICATION/FormView.aspx?postquestion=/> I using
I have an ASP.NET web site with something similar to the following code: .aspx
I am using ASP.NET and in my .aspx page I have the following code,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.