Jump to content
Software FX Community

Multiple Y Axis


kalyan_nani

Recommended Posts

Hi All,

I have a requirement.

My chart(Line Chart) has six series(Namely ser1,ser2,ser3,ser4,ser5,ser6).Among six series ser1 points to main Y axis.

My Requirement is i want to create multiple Y axis for each series( using AxisY2) without distrubing the main Y axis.

Can any one help me?

Regards,

Kalyan.P

 

Link to comment
Share on other sites

Hi Frank,

Finally i have an issue with X-Axis. The date is displaying as Jan'07 instead 01-Jan-2007.

I am using the following code to generate a datatable.

After creation of DataTable, it holds all 365 dates i added an interval of 30 days to X-Axis. 

Can you please suggest me the changes after looking in below code.

Thanks in Advance,

Kalyan.P

 

DataTable dtab = new DataTable("BudgetRep");

dtab.Columns.Add(

new DataColumn("BudgetVal", System.Type.GetType("System.Double"))); dtab.Columns.Add(new DataColumn("DailyVal", System.Type.GetType("System.Double")));dtab.Columns.Add(new DataColumn("remark_date", System.Type.GetType("System.DateTime")));

DsDate.Tables.Add(dtab);

DateTime dt = Convert.ToDateTime(repDate); // This repDate is a querystring value(in dd-mmm-yyyy format).int year = dt.Year;

int month = 1;int totdays = DateTime.DaysInMonth(year, month);

int i = 0, j = 0;for (i = 1; i <= 12; i++)

{

for (j = 1; j <= totdays; j++)

{

DataRow dr;

dr = dtab.NewRow();

string currdate = month + "/" + j + "/" + year;

dr[

"remark_date"] = Convert.ToDateTime(currdate);if (Bdgfound == false)

{

budgVal = getBudgetData(currdate);

dr["BudgetVal"] = budgVal;

}

else

{

dr["BudgetVal"] = budgVal;

}

if (Convert.ToDateTime(repDate) >= Convert.ToDateTime(currdate))

{

double d = getDailyData(currdate);dr["DailyVal"] = d;

}

dtab.Rows.Add(dr);

}

month = month + 1;

Bdgfound = false;if (month <= 12)

{

totdays = DateTime.DaysInMonth(year, month);

}

}

Chart1.DataSourceSettings.Fields.Add(new FieldMap("DailyVal", FieldUsage.Value));

Chart1.DataSourceSettings.Fields.Add(

new FieldMap("BudgetVal", FieldUsage.Value));Chart1.DataSourceSettings.Fields.Add(new FieldMap("remark_date", FieldUsage.XValue));

Chart1.DataSourceSettings.Fields[0].DisplayName =

"Daily";Chart1.DataSourceSettings.Fields[1].DisplayName = "Budget";

Chart1.AxisX.LabelsFormat.Format = AxisFormat.Date;

Chart1.AxisX.LabelsFormat.CustomFormat = "dd-MMM-YYYY";

Chart1.AxisX.Step = 30;

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...