Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Rotate axis X labels

$
0
0

Hi,

I would like to know how to rotate a bit the labels in axis X in line chart or bar chart control?

This is my code:

<ajaxToolkit:LineChart ID="LineChart1" ChartHeight="300" ChartWidth = "450" runat="server" BaseLineColor="#A156AB" Visible="false"></ajaxToolkit:LineChart>
string[] x = new string[graphDataSet.Tables[0].Rows.Count];                        decimal[] y = new decimal[graphDataSet.Tables[0].Rows.Count];                        for (int i = 0; i < graphDataSet.Tables[0].Rows.Count; i++)                        {                            x[i] = graphDataSet.Tables[0].Rows[i][0].ToString();                            y[i] = Convert.ToInt32(graphDataSet.Tables[0].Rows[i][1]);                        }                        LineChart1.Series.Add(new AjaxControlToolkit.LineChartSeries { Data = y });                        LineChart1.CategoriesAxis = string.Join(",", x);                        if (x.Length > 3)                        {                            LineChart1.ChartWidth = (x.Length * 75).ToString();                        }                        LineChart1.Visible = true;


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>