RealTime changing of X-Axis labels

Thread is closed for posting
4 posts, 0 answers
  1. pawan parashar
    pawan parashar avatar
    4 posts
    Member since:
    Oct 2009

    Posted 12 Jan 2010 Link to this post

    Hi,

    We are using  a Line chart of rad chart for updating a day wise price of a stock.
     Say,  Stock price of ABC and value increase or decrese on daily basis.
    EX:
    Jan 1-Rs10
    Jan 2-Rs20
    Jan 3-Rs25
    Jan 4-Rs30
    ...................................................
    FEB1- Rs15
    FEB2-Rs20
    ...................................................
    DEC1-Rs50
    ...................................................
    So if i log-on Jan 20th, it should draw a line graph for Jan 1 to 20th and X-Axis should contain dates from Jan 1st to 20st.
    and  If a person logs-on on July7th, He should see the line graph from Jan1 to July7th and X-Axis should contain Months for clarity.

    Please let me know how to resolve this prom. Do we have any inbulit functions or methods for doing the same in Rad Chart.


    Thanks
    Pawan Parashar
  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 12 Jan 2010 Link to this post

    The RadChart is mostly meant to create a graphical representation of the data which you are feeding it, so although you can definitely use the RadChart for what you are trying to do, all of the data processing would have to be done on your end. Since you are looking to use Dates I would suggest looking specifically at this demo.
  3. pawan parashar
    pawan parashar avatar
    4 posts
    Member since:
    Oct 2009

    Posted 12 Jan 2010 Link to this post

    Hi Schlurk ,

    Thanks for quick reply. I have no issues in drawing the graph, only issue i am facing is tht with labelling of axis. my requirement here is we will update the SQL DB every midnight with tht day data (Say Stock Prices..) and when a person opens up next day, he should be able to see the history of Stock Cost. This work fine when we have say 10 to 15 days (Say Data from Jan1 to 15 Jan...) , but if we have data for say 6 Months , stills the graph shows day wise which turns the Label of X-Axis ugly. Is there any method for after 31th Jan,2010, the label should be month wise apart from writing a logic in ur code to do this.(Which i am trying out).

    Thanks in advance.

    -Pawan Parashar
  4. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 13 Jan 2010 Link to this post

    I don't think there's a built-in function to do this with the Numerical Axis, so creating some sort of custom logic would probably be the way to go. You could potentially set up numerical values representing each month (1-12 for example) which you can then add your own labels to (like you said you're already doing). Perhaps not the best way to do it but it's a suggestion :)
Back to Top