I have been trying to pull some information from a MSSQL database and deposit it into a chart via ASP.NET v4 which has been easy. The issue I am really struggling with are the X and Y axes. For some reason, it will only allow me to have certain data on a particular axis which just happens to be the opposite (Axis) to what I want. Could someone please point me in the right direction so that I can either choose what table data (Pulling name from Table 1 and the data from table 2) goes to which axis or if there is a way to force a swap via code? Thanks for any help you guys can provide!
If it helps, this is my ASP.NET code.
<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1"
Width="900px" Height="500px" style="margin-top: 5px" Palette="EarthTones">
<Series>
<asp:Series Name="Series1" XValueMember="ActualWOB"
YValueMembers="Rig_ID" Legend="Legend" ChartType="Bar" YValuesPerPoint="4">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend Name="Legend" Title="Legend">
</asp:Legend>
</Legends>
</asp:Chart>
I want the ID/Name to be on the X Axis and the ActualWOB data on the Y Axis but just can’t seem to figure it out. Could it be something to do with my SQL Query? There are 2 Tables as mentioned earlier. One has ID, name, Manager, status and the other table has all the actual recorded data with the ID tying the 2 tables together. Because there are multiple names, I want to have the Names going up the chart with all the data fields on the bottom.
I am still not 100% sure how, but I resolved this. I think it was just a dodgy SQL Query.