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

  • Home
  • SEARCH
  • 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 6873951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:08:02+00:00 2026-05-27T04:08:02+00:00

I’m trying to make a pie chart that uses values from a user from

  • 0

I’m trying to make a pie chart that uses values from a user from text box’s. I’m using c# windows forms chart control.

The problem is where to assign the text box’s as values.

  • Is it done in code? if so what do I call?
  • Is it done in the control properties? if so what do I do?
  • Is it a bit of both? is so, well same as both above.

I’ve attempted to make one using the properties wizard but I cant see where to assign the values for it to process, the data source seem to only allow objects and connections to Dbos.
I’m hoping this is a really simple process I’m overlooking.

Yes I’ve checked MSDN but not a lot of info on the specifics I require. Yes I’ve checked google but again there is either no info or info on building my own from scratch (which I have done, but looks really bad)

this is some code ive tried

         double[] yValues = { 10, 8, 7, 12};
        string[] xNames = { "Greater than 200", "Between 200-100", "Between 100-50", "Below 50" };

        chart1.Series[0].Points.DataBindXY(xNames, yValues);
        chart1.Series[1].Points.DataBindXY(xNames, yValues);
        chart1.Series[2].Points.DataBindXY(xNames, yValues);
        chart1.Series[3].Points.DataBindXY(xNames, yValues);

it errors at series[2], saying the index was out of range. Im guessing it something to do with how the chart is currently set up

::UPDATED::
Ok so i was right i didnt assign enough series to the chart (silly me). Ive managed to get it up and running…..unfortunatly the image display looks like…..a letter(wierd).
Its a box with a cross in the middle all equal aswell. I would at least think its would display proportional to the values i sent. so is this a set up OR is there something im doing wrong in my code?

  • 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-05-27T04:08:02+00:00Added an answer on May 27, 2026 at 4:08 am

    I would suggest something like this.
    Where you would plug your y values directly from your textboxes.

       double[] yValues = { 10, 27.5, 7, 12, 45.5};
        string[] xNames = { “Mike”, “John”, “William”, “George”, “Alex” };
       myChart.Series[0].Points.DataBindXY(xNames, yValues);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.