Click here to Skip to main content
16,020,261 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,

I created a Dashboard to my system and I Have taken the 4 status counts to 4 Labels. Now I Downloaded LiveCharts Winforms and I want to pass that DataTable Values to the LiveChat PieChart. I tried but nothing went well. Can you help me guys? Thank you

Here is my Code for getting Data Table Values to the Labels.

What I have tried:

Dashboard obj = new Dashboard();
           DataTable dt = new DataTable();
           DateTime firstdate = new DateTime(DateTime.Today.Year,
           DateTime.Today.Month, 1);

           dt = obj.Count(firstdate, DateTime.Today);

           lbl_FeedVal.Text= dt.Rows[0]["IspoorCount"].ToString();
           lbl_PfeedVal.Text= dt.Rows[0]["IsfairCount"].ToString();
           lbl_GfeedVal.Text = dt.Rows[0]["IsGoodCount"].ToString();
           lbl_EFeedVal.Text = dt.Rows[0]["IsExcellentCount"].ToString();
Posted
Updated 9-Jan-23 14:58pm
Comments
Richard MacCutchan 18-Jan-20 3:29am    
"I tried but nothing went well.
Tried what? No one can help you unless you show the code that you used, and explain exactly what the problem is. The code you have provided above has nothing to do with the use of LiveCharts.

Rather than asking a random website, go back to where you downloaded it from, and ask there. If nothing else, they will know their own code a lot better than we will - and will probably have sample code which may already cover what you want to do.
 
Share this answer
 
wow! These people are not only not helpful but rude. I'm so sorry your post was treated this way. Here is a link that may help you out if after all this time you are still seeking an answer. How to create Line chart from data stored in data table and save chart in image in winform application[^]
 
Share this answer
 
Comments
Graeme_Grant 9-Jan-23 20:56pm    
This question is 2 years old. Please answer questions that are current and need help.

Also, if you have an issue with any responses, please hover over the flag or post a comment in Spam and Abuse Watch Discussion Boards[^], the public passive aggressive commentary is not needed and of the same nature as that of who you accuse of the same.

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