Hi
I have 2 radchart in my page. I am differentiating these two charts based on the two column. There are Dispensation and Discretion. using the above two columns, i am setting as DataManager.ValuesYColumns for each chart. I am applying group by "Type" which is another column. This code is working perfect for Discretion. The same one is not working for Dispensation. In Dispensation, i have values for December and march month. But it is appearing in the December month. I did sample application application. it is working exactly how i need. When i copy and paste the same code in my project it is behaving differently. I have spent 2 days to fix this. I tried all possible ways.
I have 2 radchart in my page. I am differentiating these two charts based on the two column. There are Dispensation and Discretion. using the above two columns, i am setting as DataManager.ValuesYColumns for each chart. I am applying group by "Type" which is another column. This code is working perfect for Discretion. The same one is not working for Dispensation. In Dispensation, i have values for December and march month. But it is appearing in the December month. I did sample application application. it is working exactly how i need. When i copy and paste the same code in my project it is behaving differently. I have spent 2 days to fix this. I tried all possible ways.
chart.PlotArea.XAxis.DataLabelsColumn = "MonthYear";
chart.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;
chart.PlotArea.XAxis.Appearance.CustomFormat = "MMM-yy";
chart.PlotArea.XAxis.AutoScale = false;
chart.PlotArea.YAxis.AutoScale = false;
chart.ChartTitle.Visible = true;
chart.ChartTitle.TextBlock.Appearance.Visible = true;
chart.ChartTitle.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopLeft;
if (chart.ID == "radChart")
{
chart.PlotArea.YAxis.AutoScale = true;
chart.DataManager.ValuesYColumns = new string[] { "Discretion" };
//chart.PlotArea.YAxis.MinValue = start;
//chart.PlotArea.YAxis.MaxValue = end;
//chart.PlotArea.YAxis.LabelStep = diff;
if (strCrewType == "FD")
chart.ChartTitle.TextBlock.Text = "Incidents of Flight Deck Operating into Discretion";
else
chart.ChartTitle.TextBlock.Text = "Incidents of Crew Operating into Discretion";
}
else
{
chart.PlotArea.YAxis.AutoScale = false;
//chart.PlotArea.YAxis.MinValue = start;
//chart.PlotArea.YAxis.MaxValue = end;
chart.PlotArea.YAxis.LabelStep = diff;
chart.DataManager.ValuesYColumns = new string[] { "Dispensations" };
chart.ChartTitle.TextBlock.Text = "QCAA Dispensations";
}
chart.DefaultType = Telerik.Charting.ChartSeriesType.StackedBar;
chart.DataGroupColumn = "Type";
var obj = (from c in listCrewMetricsOut
where c.CrewType == strCrewType
select c);
chart.DataSource = obj;
chart.DataBind();