Hi Peter,
I have problem showing 24 months sale data in bar chart. My 24 months came from 12 months from each year..Last say for year 2010..i want my data to display from Jan 2009 to Dec 2010..24 months period. but my data will return 1-12 from 2009 and 1-12 from 2010..not 1-24..how should i go about this? Pls help me see my array data below.Many thanks.
string[] labels = {"1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24"};
double[] Currentvalues = dtCurrentTotalSold.getCol(0); // data for 2009
double[] Currentmonths = dtCurrentTotalSold.getCol(1); // 1 - 12 representing the month of the value
double[] Currentvalues1 = dtCurrentTotalSold1.getCol(0); // data for 2010
double[] Currentmonths1 = dtCurrentTotalSold1.getCol(1);
double[] data = new double[24];
for (int i = 0; i < data.Length; ++i)
{
data[i] = Chart.NoValue;
}
//put your values in the suitable array positions based on the month
for (int i = 0; i < Currentvalues.Length; ++i)
{
data[(int)Currentmonths[i] - 1] = Currentvalues[i];
} |