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
195
set X2 Axis values to a DataTable column
posted

 Hi,

 I'm using a stacked column chart and would like to set the X2 axis labels to values from a column in a datatable that I am binding the chart to.  The X axis seems to bind to the first column by default.

My chart is attached (I hope).

 My datatable looks like 

dt.Columns.Add("UserId", typeof(System.String));
dt.Columns.Add("Percentage", typeof(System.String));
dt.Columns.Add("DepartedSales", typeof(System.Double));
dt.Columns.Add("ForwardSales", typeof(System.Double));
dt.Columns.Add("Target", typeof(System.Double));

At the moment the first column appears on both X and X2 axis, but I want the 2nd column "Percentage" to appear on the X2 axis whilst keeping "UserId" on the X axis.

 Is there a way to do this?

 Thanks,

James.

Parents Reply Children