I've got a straight forward column chart with 4 series on it, % on the Y and DateTime on the X axis. All is working fine except that the X axis labeling and interval marks are incorrect (well, misleading). The 1st cluster of columns are Januarys data, however the chart positions the cluster directly on top of a Feb label. The interval line (is that the correct name?) isn't helping either as it runs through the cluster of Januarys data making it look like col 1 & 2 are in Jan and col 3 and 4 in Feb. The data being used runs from Jan to July, with Aprils missing (intentional), however the chart makes it look like it runs Feb to Aug with May missing.
Data
So my questions is: How can I centre the clusters of columns in their own interval section with the correct month label on the X axis directly below it? I can even live without the interval line as long as the correct month displays below the correct data.
I've tried this chart with Splines, Lines and without any formatting and they all have the same problem. Help. It's Friday and I want to get this fixed so I can go to the pub.
Update: As requested - code behind:
// set Y axix range
Chart1.ChartAreas["ChartArea1"].AxisY.Minimum = 0;
Chart1.ChartAreas["ChartArea1"].AxisY.Maximum = 100;
// show y line every x%
Chart1.ChartAreas[0].AxisY.Interval = 10;
// Set axis title
Chart1.ChartAreas["ChartArea1"].AxisX.Title = "Period";
Chart1.ChartAreas["ChartArea1"].AxisY.Title = "Percentage (%)";
// set the x axis date format to short month and year
Chart1.ChartAreas[0].AxisX.IsLabelAutoFit = false;
Chart1.ChartAreas[0].AxisX.LabelStyle.Format = "MMM \n yyyy";
// The legend
Chart1.Legends.Add("Default");
Chart1.Legends["Default"].Docking = Docking.Bottom;
Chart1.Legends["Default"].Alignment = StringAlignment.Center;
// load the template for the basic styles
Chart1.Serializer.IsResetWhenLoading = false;
Chart1.LoadTemplate("SkyBlue.xml");
and mark up:
<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1"
Width="600px">
<Series>
<asp:Series Name="thing1" XValueMember="Period"
YValueMembers="thing1">
</asp:Series>
<asp:Series ChartArea="ChartArea1" Name="Team" XValueMember="Period"
YValueMembers="thing2">
</asp:Series>
<asp:Series ChartArea="ChartArea1" Name="Systems" XValueMember="Period"
YValueMembers="thing3">
</asp:Series>
<asp:Series ChartArea="ChartArea1" Name="Env" XValueMember="Period"
YValueMembers="thing4">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:myConnString %>"
SelectCommand="mySP"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="1" Name="ID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>