Date on X-axis

2 posts, 0 answers
  1. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 08 Mar 2010 Link to this post

    Hi,

    I'm trying to make a radchart showing data from my database.
    So far I can show the correct data on my Y-axis, just using a simple query and adding this to the itemssource of the chart.

    But when I Want to show the XValues (datetime) I get some issues.
    First I improved my query so that I also had my XValues.
    (select SUBSTRING(convert(varchar, XValue, 108), 1, 5) XValue, YValue from ...)
    This should return just the hour and minutes of the datetime. (i.e. 13:00)

    Afterwards I insert the data into a list called RadChartResult:

    RadChartList

     

    RadChartResult = new RadChartList();

     

     

     

    while (reader.Read())

     

    {

     

    RadChartResult.Add(

    new RadChartOEE { Percentage = Convert.ToInt32(reader["YValue"]), Tijdstip = Convert.ToDateTime(reader["XValue"]) });

     

    }

     

    return RadChartResult;

    When running this, still the whole datetime is shown on the X-axis! i.e. thursday 08 march 2010 ...

     

     

     

    Can someone plz help or just respond to my post?
    Cause so far I didn't get much answers out of this forum...

    Kind Regards,

    Gj

     

     

  2. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 08 Mar 2010 Link to this post

    I did solve this issue.
    So no need to reply anymore!

    Gj
Back to Top