I'm using ASP.NET Chart Controls for displaying some data. I'm not pulling any data from the database through a dataset. I'm adding them manually. I don't know how to add AxisLabels
to X-axis
or Y-axis
. I've tried using Axis.title
, customlabels.Add()
etc.. but I couldn't display anything.
And I've this stacked column chart which has columns added through a for loop. How to add different AxisLabels
to it?
for (int i= 0; i< 10; i++)
{
Chart1.Series["1"].Points.AddY(5);
Chart1.Series["2"].Points.AddY(8);
}
How do I add AxisLabels
to these 10 columns ?
Thanks, Manish
Chart1.Series(1).Points(i).AxisLabel = val;
This itself is the answer for the question. I was writing AxisX.Enabled = false; that's why I wasn't able to display axis labels for AxisX.