<asp:Chart ID="chartSellThru" runat="server" Height="400px" Width="1200px" >
<Series>
<asp:Series Name="ActualsQTD">
</asp:Series>
<asp:Series Name="ForecastQTD">
</asp:Series>
<asp:Series Name="QTDRatio" ChartType="Line">
</asp:Series>
<asp:Series Name="TargetAttain" ChartType="Line">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="SellThruChartArea">
</asp:ChartArea>
</ChartAreas>
chartSellThru.Series["ActualsQTD"].XValueMember = "ProductGroup";
chartSellThru.Series["ActualsQTD"].YValueMembers = "ActualsQTD";
我在default.aspx页面中写了上面几行代码,最后两行代码写在default.aspx.cs页面中。数据绑定到图表。
如何编写折线图的代码。确保值是从数据库绑定的。如何将值从 sql server 绑定到折线图。