Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
Bar chart with x-axis labels
posted

Hello I want to plot the the Year under the X axis of my bar chart, I have the column name under each bar but the year isn't displayed

Here is the code I wrote :


            DataTable table = new DataTable();
            table .Columns.Add("Year", typeof(String));
            table .Columns.Add("Value", typeof(System.Int32));
            table .Columns.Add("Esperance", typeof(System.Int32));

            table .Rows.Add(new object[ {"2008",    9150000,     11888124});
            table .Rows.Add(new object[ {"2009",    9150000,     11792015});
            table .Rows.Add(new object[ {"2010",    9150000,     11696682});
            table .Rows.Add(new object[ {"2011",    9150000,      11602120});
            table .Rows.Add(new object[ {"2012",    9150000,      11508323});

            chart.Data.DataSource = table ;
            chart.Data.DataBind();

Can you tell me wich property allow me to do that


Thanks 

Parents Reply Children
No Data