I have these XY values:
Series S1 = new Series() S1.Points.AddXY(9, 25); S1.Points.AddXY(10, 35); S1.Points.AddXY(11, 15); chart1.Series.Add(S1);
but I need to show the X values ββin the graph as follows:
X = "9-10"
X = "10-11"
X = "11-12"
How can i achieve this?
So far, this is what I found:

and here is the code:
private void Form1_Shown(object sender, EventArgs e) { chart1.ChartAreas[0].AxisX.Minimum = 7; chart1.ChartAreas[0].AxisX.Maximum = 15; Series S1 = new Series(); S1.Points.AddXY(9, 25); S1.Points.AddXY(10, 35); S1.Points.AddXY(11, 15); chart1.Series.Add(S1); chart1.Series[0].Points[0].AxisLabel = "9-10"; chart1.Series[0].Points[1].AxisLabel = "10-11"; chart1.Series[0].Points[2].AxisLabel = "11-12";
as you can see, I work with numbers and set texts for X axis labels, but I can only do this for DataPoints, I need this for the whole range of values.
Any ideas please?
source share