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.
Loop through to show values in a Chart
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Wang Wen41 pointsPosted May 11, 2015, 11:42 PM EDT
I believe VanCharts will surely give you good solution for getting your work done.
It supports data display in the web (JavaScript) and mobile terminals (Android native/iOS native/Webview) and provides various types of common commercial charts.