Click here to Skip to main content
15,888,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello guys can someone show me an example code on how can i make pie chart or even graph out of textbox values? for example i have 2 series like total number of boys in a class and my total number of girls in a class. i need some serious help in coding here.

What I have tried:

i tried to search on youtube and all i see is the pie chart values comes from the database besides it is done by c# codes.
Posted
Updated 27-Dec-16 2:21am
Comments
Afzaal Ahmad Zeeshan 26-Dec-16 14:27pm    
You may use Microsoft Charts in this, or consider getting a charts rendering library; Angularjs for example, has this feature.

1 solution

It is rare that you will find exact code that you can copy and paste. You have to think of your code in separate parts. You need code that gets data and then sets up the chart. You said you found code that gets values from the database and does the chart. So, that code gives you both parts of what you need. So, you have to change the code you found so that the data comes from your textboxes instead of from the database. That should be very easy.

Data from a textbox is just txtBoyCount.Text. Simple.

Use what you can from the example and then write the rest.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900