TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
TAN WhoAMI
NA
291
0
Loop through to show values in a Chart
Mar 3 2015 10:29 PM
with this, I have no problem showing the Chart.
private void LoadColumnChartData()
{
((ColumnSeries)mcChart.Series[0]).ItemsSource =
new KeyValuePair<string, int>[]
{
new KeyValuePair<string,int>("Project Manager", 12),
new KeyValuePair<string,int>("CEO", 25),
new KeyValuePair<string,int>("Software Engg.", 5),
new KeyValuePair<string,int>("Team Leader", 6),
new KeyValuePair<string,int>("Project Leader", 10),
new KeyValuePair<string,int>("Developer", 4)
};
}
But now, I need to display the values (inside a loop) in the chart. Is that possible?
Inside that FOR loop, if I have the below code:
((ColumnSeries)mcChart.Series[0]).ItemsSource = new KeyValuePair<string, double>[]
{
new KeyValuePair<string,double>(SelectedTestSystems[i], MeanUtilization)
};
I can only get its last value.
Say I have to loop through ten times, I need to display 10 barcharts showing 10 different SelectedTestSystems and 10 values of MeanUtilization.
Reply
Answers (
1
)
insert images into sql
Readonly ,Const Keyword with static Modifier