Is there a way to establish the datalabelscolumn for a numeric column?
I am returning 3 columns from a stored procedure. Column 1 is weekname and has values 1-52 in rotating order, the other two are the series data.
DataLabelsColumn is being set in page.load as:
If from the stored procedure, I do this: Select [weekname] as weekname
I get 3 series in my chart and the datalabelscolumn directive is ignored.
If from the stored procedure, I do this: Select convert(varchar(10),[weekname]) as weekname
or SELECT convert(text, convert(varchar(10),[weekname]) )) as weekname
I get 3 series in my chart and the datalabelscolumn directive is ignored.
If from the stored procedure, I do this: SELECT 'w ' + convert(varchar(10), [weekname]) as weekname
DataLabelsColumn is respected and I get 2 series.
Whole routine is below:
I am returning 3 columns from a stored procedure. Column 1 is weekname and has values 1-52 in rotating order, the other two are the series data.
DataLabelsColumn is being set in page.load as:
rctrend.PlotArea.XAxis.DataLabelsColumn = "weekname"
If from the stored procedure, I do this: Select [weekname] as weekname
I get 3 series in my chart and the datalabelscolumn directive is ignored.
If from the stored procedure, I do this: Select convert(varchar(10),[weekname]) as weekname
or SELECT convert(text, convert(varchar(10),[weekname]) )) as weekname
I get 3 series in my chart and the datalabelscolumn directive is ignored.
If from the stored procedure, I do this: SELECT 'w ' + convert(varchar(10), [weekname]) as weekname
DataLabelsColumn is respected and I get 2 series.
Whole routine is below:
Private Sub MakeGraph() |
If Not IsPostBack Then |
rctrend.Chart.PlotArea.YAxis.AutoScale = True |
rctrend.PlotArea.YAxis.AutoScale = True |
rctrend.PlotArea.YAxis.IsZeroBased = False |
rctrend.PlotArea.XAxis.DataLabelsColumn = "weekname" |
End If |
rctrend.ChartTitle.TextBlock.Text = "Something" |
rctrend.DataSource = gensql.Get52WeekGraph |
rctrend.DataBind() |
If Not IsPostBack Then |
rctrend.Series(0).Appearance.ShowLabels = False |
rctrend.Series(1).Appearance.ShowLabels = False |
End If |
End Sub |