0

I need to show all axislabels of point. For example i have two series and one point in each series: in series 1: [1,3][axis_label1]; in series 2: [1,5][axis_label2]. I need to show axis_label1 and axil_label2 under x axis coordinate 1. But by default chart is showing only axis_label1.

I am filling chart like this:

        chart4.Series.Clear();
        chart4.Series.Add("****");
        chart4.Series.Add("****");

        chart4.ChartAreas[0].CursorX.IsUserEnabled = true;
        chart4.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
        chart4.ChartAreas[0].AxisX.Interval = 1;


        for (int i = 0; i < alphabet.Length; i++)
        {
            DataPoint dp = new DataPoint();
            dp.AxisLabel = alphabet[i].ToString(); // first label of point
            dp.YValues = new double[] { OTFreq[i] };

            chart4.Series[0].Points.Add(dp);

            DataPoint dp1 = new DataPoint();
            dp1.AxisLabel = alphabet[i].ToString()+"_"; // second label of point
            dp1.YValues = new double[] { CTFreq[i] };

            chart4.Series[1].Points.Add(dp1);
        }

I got chart:

 _
| |_       _
| | |    _| |
| | |   | | |
| | |   | | |
--|-------|---------
  A       B

I need chart:

 _
| |_       _
| | |    _| |
| | |   | | |
| | |   | | |
--|-------|---------
A  A_    B B_
Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Vorotnyak_Nazar
  • 894
  • 1
  • 10
  • 22
  • Possible duplicate of [Force all axis labels to show](https://stackoverflow.com/questions/7566996/force-all-axis-labels-to-show) – Necvetanov Aug 21 '17 at 14:57

1 Answers1

0

I've found that for my target I can use DataPoint.Label instead of DataPoint.AxisLabel. In this case labes will be above the column but it doesn't matter for me.

Vorotnyak_Nazar
  • 894
  • 1
  • 10
  • 22