我们有一个名为SprintTasks的本地数据库表。我们希望在visual studio图表中显示这些数据。
目前,该图表仅显示从数据库表中下拉第一行。
有没有办法将所有行绑定到图表控件?我们目前有以下代码。任何帮助赞赏。
<asp:Chart ID="burndownChart" runat="server" DataSourceID="getSprintTask" Height="504px" Width="1052px">
<Series>
<asp:Series Name="Series1" XValueMember="sprint_start_date"
YValueMembers="hours_remaining" XValueType="Date" YValueType="Int32">
</asp:Series>
<asp:Series ChartArea="ChartArea1" Name="Series2" XValueMember="sprint_end_date" YValueMembers="hours_remaining" XValueType="Date" YValueType="Int32">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1"></asp:ChartArea>
</ChartAreas>
</asp:Chart>
<asp:SqlDataSource ID="getSprintTask" runat="server" ConnectionString="<%$ConnectionStrings:smsConnection %>" ProviderName="<%$
ConnectionStrings:smsConnection.ProviderName %>" SelectCommand="SELECT * FROM SprintTask INNER JOIN Sprint ON SprintTask.sprint_id = Sprint.Id WHERE Sprint.Id = @sid">
<SelectParameters>
<asp:QueryStringParameter Name="sid" QueryStringField="sid" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>