Profile Picture

Database Binding with DateTimeScale

Posted By Bhumi Patel 12 Years Ago
Author
Message
Bhumi Patel
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 33, Visits: 1
Hi All,

I am experiencing some difficulties while binding data from database with DateTimeScale. I am retrieving 2 different lists from database: list of DateTime(with 5 min interval) and list of values. I am not sure how can I relate the datetime with the value. Please review my code below:

DateTime StartDate = DateTimeList[0];
DateTime EndDate = DateTimeList[DateTimeList.Count - 1];

TimeSpan span = EndDate - StartDate;
span = new TimeSpan(span.Ticks / 30);

if (span.Ticks > 0)
{
while (StartDate < EndDate)
{
StartDate += span;
lineSeries.XValues.Add(StartDate);
lineSeries.Values.Add(?);
count++;
}
}




Similar Topics


Reading This Topic