Name X and Y axis

Thread is closed for posting
5 posts, 0 answers
  1. Sneha Gokarn
    Sneha Gokarn avatar
    14 posts
    Member since:
    Dec 2009

    Posted 16 Dec 2009 Link to this post

    how do  i put a single label for the x and y axis?

    Sneha

  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 16 Dec 2009 Link to this post

    This documentation is always very helpful when styling items, so I think it'd be something like this:

     
    RadChart1.PlotArea.XAxis.AxisLabel = "X Label"
    RadChart1.PlotArea.YAxis.AxisLabel = "Y Label"

  3. Sneha Gokarn
    Sneha Gokarn avatar
    14 posts
    Member since:
    Dec 2009

    Posted 16 Dec 2009 Link to this post

    it says they are read only properties
  4. Bartholomeo Rocca
    Bartholomeo Rocca avatar
    247 posts
    Member since:
    May 2006

    Posted 17 Dec 2009 Link to this post

    Hello there,

    Schlurk almost got it right -- these are complex properties and that's why they are read-only and cannot be set. You need to set the AxisLabel.TextBlock.Text property to achieve the desired effect:

    RadChart1.PlotArea.XAxis.AxisLabel.TextBlock.Text = "X Label"
    RadChart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Y Label"


    Greetings,
    Bart.
  5. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 17 Dec 2009 Link to this post

    Ah yes, I should've opened up my application where I do set the labels - I forgot the Textblock.Text part :(
Back to Top