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

Adding labels along axis

1 Answer 39 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 07 May 2010, 10:13 PM
Sorry for what is probably an elementary question. First day using Radchart.  I've been searching for an answer, but haven't found anything yet.

I'm dynamically creating the charts because the # of charts will change. Here's the function I'm using:

    Protected Sub CreateChart(ByVal sQuestionId As StringByVal chtChart As RadChart) 
        Dim csSeries As New Telerik.Charting.ChartSeries 
 
        csSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName 
 
        chtChart.Skin = "Inox" 
        chtChart.SeriesOrientation = ChartSeriesOrientation.Horizontal 
 
        oConn.Open() 
        Try 
            oCmd = New SqlCommand("Survey_ReportingByQuestionId", oConn) 
            oCmd.CommandType = CommandType.StoredProcedure 
            oCmd.Parameters.Clear() 
            oCmd.Parameters.AddWithValue("@QuestionId", sQuestionId) 
 
 
            If oRdr.HasRows Then 
                Do While oRdr.Read 
                    Dim csiSeriesItem As New Telerik.Charting.ChartSeriesItem 
                    csiSeriesItem.YValue = oRdr.Item("AnswerCount"
                    csiSeriesItem.Name = oRdr.Item("Answer"
 
                    csSeries.AddItem(csiSeriesItem) 
                Loop 
            End If 
 
        Catch ex As Exception 
 
        Finally 
            oConn.Close() 
        End Try 
 
        chtChart.AddChartSeries(csSeries) 
    End Sub 

The "answers" are things like True/False, A/B/C/D, etc.  How can I use those to label the X axis instead of the default numbers that the chart generates?  The only way I've seen to do it is through databinding, which I'm not doing.

Any help would be greatly appreciated!



1 Answer, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 12 May 2010, 08:38 AM
Hello Matt,

I think you are looking to create a categorical chart.

Sincerely yours,
Vladimir Milev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Chart (Obsolete)
Asked by
Matt
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Share this question
or