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
640
UltraWinChart Y axis problem
posted
Hi
 
I am working on a barchart with the following data
 
   Month           Sales1    Sales2          Growth

Jan

100

120

20.00%

Feb

130

100

-23.08%

Mar

160

70

-56.25%

Apr

200

100

-50.00%

May

180

140

-22.22%

Jun

170

190

11.76%

 

 I have got the datas Month in the X- axis and Sales1 and Sales2 as the bar columns. I also need to have the growth marked on the graph. The growth values should be marked on the right Y-axis along with the growth points connected in the graph. I am using the following code which gives me a partial result.

 Cmd = new SqlCommand (Procedure, Conn);

Reader = Cmd.ExecuteReader();

DT =

new DataTable();

DT.Columns.Add(

"Month", typeof(System.String));

DT.Columns.Add(

"Sales1", typeof(System.Int32));

DT.Columns.Add(

"Sales2", typeof(System.Int32));

DT.Columns.Add(

"Percentage", typeof(System.String));

 

 

while(Reader.Read())

{

DT.Rows.Add(

new object[] { Reader.GetSqlValue(0), Reader.GetValue(1), Reader.GetValue(2), Reader.GetSqlValue(3) });

}

Reader.Close();

ultraChart1.Axis.Y.RangeType = Infragistics.UltraChart.Shared.Styles.

AxisRangeType.Custom;

ultraChart1.Axis.Y.RangeMin = 0;

ultraChart1.Axis.Y.RangeMax = 200;

ultraChart1.Axis.Y2.Visible =

true;

ultraChart1.Axis.Y2.LineDrawStyle = Infragistics.UltraChart.Shared.Styles.

LineDrawStyle.Solid;

ultraChart1.Axis.Y2.LineColor =

Color.White;

 

 

//ultraChart1.Axis.Y2.RangeType = Infragistics.UltraChart.Shared.Styles.AxisRangeType.Custom;

 

 

 

 //ultraChart1.Axis.Y2.RangeMin = -70.00;

 

 

 

 //ultraChart1.Axis.Y.RangeMax = 30.00;

 

 

 

 //ultraChart1.Axis.Y2.TickmarkInterval = 10;

ultraChart1.DataSource = DT;

ultraChart1.Data.DataBind();

 

 

 Any suggesstions?

 Thanks & Regards

Ferdin