Question

I have 4 radar charts on my Webpage. Three out of the four charts have horizontally orientated x axis labels. One of the charts has its labels orientated towards the centre of the chart.

All charts are created dynamically in the same way. I believe it is occurring because the one chart has a large number of points.

Please see the below image. enter image description here

I have the following code setting the orientation of the Xaxis, but this does not work.

ca.AxisX.TextOrientation = TextOrientation.Horizontal;

The code I have tried so far has not worked. I inserted the following code to see if I could change the orientation of any of the axes, it changes the orientation of the y axis but not the x axis.

foreach (Axis axis in chartArea.Axes)
            {
                axis.LabelAutoFitStyle = LabelAutoFitStyles.None;
                axis.LabelAutoFitMaxFontSize = 50;
                axis.IsLabelAutoFit = false;
                axis.LabelStyle.Angle = 90;
                aaxisTextOrientation = TextOrientation.Horizontal;

            }

How do I make all charts have their x axis labels orientated horizontally?

Was it helpful?

Solution

Answering my own question in case it may be useful to someone else in the future:

chart.Series[series1]["CircularLabelsStyle"] = "Horizontal";

Other option are Radial and Circular

Please see the following link for more details about custom attributes. link

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top