I'm attempting to do something similar, and have run into a problem binding it to an SQLDataSource. I don't believe the problem is with the datasource, as it is correctly powering an ASP.net chart. It will also work if I manually add values, which leads me to believe my javascript and css files are set up correctly. Any ideas on what's going on?
Snippets of my chart code follow:
Code:
<asp:SqlDataSource ID="dsSQLQuery" runat="server"
ConnectionString="<%$ ConnectionStrings:SQL %>"
ProviderName="<%$ ConnectionStrings:SQL.ProviderName %>"
SelectCommand="SELECT [numViews], [supplementTitle] FROM [tblLessons] WHERE ([rmID] = @rmID)">
<SelectParameters>
<asp:ControlParameter ControlID="ddlRoadmaps"
Name="rmID" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Chart ID="chtViewsByLesson" runat="server" DataSourceID="dsSQLQuery"
Width="500px">
<Series>
<asp:Series Name="Series1" XValueMember="supplementTitle"
YValueMembers="numViews">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
<jqChart:Chart ID="Chart1" runat="server" DataSourceID="dsSQLQuery">
<Series>
<jqChart:LineSeries XValuesField="supplementTitle" YValuesField="numViews">
</jqChart:LineSeries>
</Series>
</jqChart:Chart>