kalyan_nani Posted July 20, 2007 Report Share Posted July 20, 2007 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 More sharing options...
Frank Posted July 20, 2007 Report Share Posted July 20, 2007 Simply assign: chart.Series[0].AxisY = chart.AxisY; chart.Series[1].AxisY = chart.AxisY2; chart.Series[2].AxisY = chart.AxisY2; ... Link to comment Share on other sites More sharing options...
kalyan_nani Posted July 20, 2007 Author Report Share Posted July 20, 2007 Thanks for your reply. But each series have its own data. so it need to set accordingly Regards, Kalyan Link to comment Share on other sites More sharing options...
Frank Posted July 20, 2007 Report Share Posted July 20, 2007 Soryy I don't undersand. Please attach a screenshot of what you want. Link to comment Share on other sites More sharing options...
kalyan_nani Posted July 23, 2007 Author Report Share Posted July 23, 2007 Hi Frank, I found an article related to my issue in programer's guide and sample. Now my isuue is got resolved. Thaks for support. Regards, Kalyan.P Link to comment Share on other sites More sharing options...
kalyan_nani Posted July 23, 2007 Author Report Share Posted July 23, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.