Click here to Skip to main content
15,922,015 members

Comments by acing wei (Top 110 by date)

acing wei 28-Jan-14 23:13pm View    
Thanks Jocodes for your help in this few weeks, I did it.. I use take() and skip() to read from my datatable and bind it to chart.
Have a nice day :)
acing wei 28-Jan-14 19:43pm View    
X is string output ,contains timing like : 0730,0830,0930,1030
which is read from the first row of my datatable.
acing wei 28-Jan-14 5:06am View    
Jocodes, can help me see and give me some suggestion in the bottom code. i got idea splitting my y into 2 chart. but i don know how my x value split..?
acing wei 28-Jan-14 5:05am View    
string[] x = new string[dtoutput.Rows.Count];
int[] y1 = new int [dtoutput.Rows.Count];
int[] y2 = new int[dtoutput.Rows.Count];
int[] y3 = new int[dtoutput.Rows.Count];

for (int i = 0; i < dtoutput.Rows.Count; i++)
{

if (i == 0)
{
//fetching the row values and assigning to stringarray
x = Array.ConvertAll(dtoutput.Rows[i].ItemArray, item => item.ToString()).ToArray();
}
else if (i == 1)
{
y1 = Array.ConvertAll(dtoutput.Rows[i].ItemArray, item => Convert.ToInt32(item)).ToArray();
}
else if (i == 2)
{
y2 = Array.ConvertAll(dtoutput.Rows[i].ItemArray, item => Convert.ToInt32(item)).ToArray(); ;
}
else if (i == 3)
{
y3 = Array.ConvertAll(dtoutput.Rows[i].ItemArray, item => Convert.ToInt32(item)).ToArray(); ;
}
Chart1.Series[0].Points.DataBindXY(x, y1);
Chart1.Series[1].Points.DataBindY(y2);
Chart1.Series[2].Points.DataBindY(y3);
i got an idea when button pressed go to another chart.
if i want to put my y3 in different chart how can i split my x value into 2 chart.
acing wei 28-Jan-14 4:39am View    
alright,Thanks and have a nice day...