Problem changing X-Axis Label

2 posts, 0 answers
  1. amirnet
    amirnet avatar
    5 posts
    Member since:
    Jul 2007

    Posted 22 Oct 2009 Link to this post

    Hi
    i cannot change my X-Axis Label after setting Chart.ItemSource ,please help !!!!

    TickPointLabel=XX

    i see that the property has changed in debgugger,but no changes in preview
  2. Robert
    Robert avatar
    82 posts
    Member since:
    Jun 2009

    Posted 09 Nov 2009 Link to this post

    Hello Amirnet,

    If you call refresh on the RadChart after changing the label, it should update and display it.

        public partial class Form1 : Form 
        { 
            int[] values = { 10, 15, 20, 25, 30, 35, 40 }; 
     
            public Form1() 
            { 
                InitializeComponent(); 
                radChart1.PlotArea.XAxis.AxisLabel.Visible = true
                radChart1.DataSource = values; 
            } 
     
            private void radButton1_Click(object sender, EventArgs e) 
            { 
                // Change the X-Axis label and refresh the chart 
                radChart1.PlotArea.XAxis.AxisLabel.TextBlock.Text = "Hello"
                radChart1.Refresh(); 
            } 
        } 

    I hope this helps.

    - Robert
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top