This is a migrated thread and some comments may be shown as answers.

How to Set X-Axis Labels Programmatically ?

1 Answer 89 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Noha
Top achievements
Rank 1
Noha asked on 15 Dec 2010, 01:31 PM
Dear all

As shown in this Demo
I want to set X-Axis labels programmatically

as shown in the pic in the Demo X-Axis is = [ 12, 3, 4, 5 ]

I want to change it to be text instead.

Can anyone help me how to do that programmatically ?


Regards

1 Answer, 1 is accepted

Sort by
0
Joel
Top achievements
Rank 2
answered on 15 Dec 2010, 09:38 PM
I just had to look it up myself this morning as it had been a while, there are several ways, but this is the way I did it today.

Dim rollcount As Int32 = 0
RadChart1.PlotArea.XAxis.Clear()
RadChart1.PlotArea.XAxis.AddRange(1, UBound(lblArray) + 1, 1)
        Do Until rollcount = UBound(lblArray) + 1
            RadChart1.PlotArea.XAxis(rollcount).TextBlock.Text = lblArray(rollcount)
            rollcount += 1
        Loop
Tags
Chart (Obsolete)
Asked by
Noha
Top achievements
Rank 1
Answers by
Joel
Top achievements
Rank 2
Share this question
or