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:
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!
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 String, ByVal 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!