Thread is closed for posting
3 posts, 0 answers
  1. Marc Schrader
    Marc Schrader avatar
    5 posts
    Member since:
    Nov 2008

    Posted 15 Sep 2011 Link to this post

    Dear Telerik Team,
    I got gold historical data like this:

    "2011-07-07 15:08:39" - "Valid"
    "2011-07-07 15:09:20" - "Valid"
    "2011-07-07 15:10:39" - "Invalid"
    "2011-07-07 15:11:26" - "Valid"

    and so on.
    How can i build like a graph like

    I also got this data only in memory as an List<object>.

    Many thanks
  2. Marc Schrader
    Marc Schrader avatar
    5 posts
    Member since:
    Nov 2008

    Posted 19 Sep 2011 Link to this post

    Dear Telerik Team,
    I am still working on this issue. I found the NumericalAxis Demo Project very interesting for this one. So I implemented this in my project. Everything was working well, like in the demo. Now I try to add my specific data to it.

    My Method look like this :

    List<DateTime> data = _scriptLogParser.GetLogEntrys();
    const double hourStep = 1 / 24.0;
    const double minuteStep = hourStep / 60;
    double startTime = data.First().ToOADate();
    double endTime = data.Last().ToOADate();
    string start = data.First().ToString();
    string end = data.Last().ToString();
    radChart1.PlotArea.XAxis.AddRange(startTime, endTime, hourStep);
    ChartSeries series = radChart1.Series[0];
    for (double currentTime = startTime; currentTime < endTime; currentTime += minuteStep)
        ChartSeriesItem item = new ChartSeriesItem();
        item.XValue = currentTime * minuteStep;
        DateTime test = DateTime.FromOADate(currentTime);
        int index = data.FindIndex(p => p == DateTime.FromOADate(currentTime));
        item = new ChartSeriesItem();
        if (index >= 0)
            item.YValue = 1;
            item.YValue = 0;

    First I get my data from "_scriptLogParser.GetLogEntrys();".

    After that I set the start date and end date and interate through this in minute steps. I debug this part and it worked pretty well. But my Output is false. It looks like this :


    This is not correct. I manipulate the data. So I got data from 15 till 18 o´clock. Than nothing and then the data come up at 23 o´clock. But it seems that the chart is displaying there was always data. 

    Where is my wrong line ?

    Thanks again.
  3. Yavor
    Yavor avatar
    11 posts

    Posted 20 Sep 2011 Link to this post

    Hi Marc,

    Based on the supplied information, it is hard to determine what is causing this unwanted output. If this issue persists, you can open a formal support ticket, and send us a small project, demonstrating your setup, and showing the issue. We will debug it locally, and advise you further.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top