Donut Chart Data binding Asp.net

1 posts, 0 answers
  1. Liaqat
    Liaqat avatar
    1 posts
    Member since:
    Jun 2015

    Posted 13 Sep Link to this post

    Hello, can you please tel me on donuts chart how i can bind data on Series Item , I've create data source SQL query which show's 2 value's please see the code

    <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" DataSourceID="dountchart">
                              <PlotArea>
                                  <Series>
                                      <telerik:DonutSeries StartAngle="90" Name="DonutSeries1" DataFieldY="costbudget">
                                          
                                      </telerik:DonutSeries>
                                  </Series>
                              </PlotArea>



    <Zoom Enabled="False"></Zoom>

                          </telerik:RadHtmlChart>
                          <asp:SqlDataSource ID="dountchart" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="SELECT ROUND((SELECT SUM([Budget Estimates 2017-18]) AS FUNDWISE FROM [budgetbook-17-18] WHERE (Cost_ctr = @cost1)) / (SELECT SUM([Budget Estimates 2017-18]) AS costwise FROM [budgetbook-17-18] AS [budgetbook-17-18_3] WHERE (Fund = @fund1)) * 100, 0) AS costbudget, NULLIF ('', 0) AS totalbudgetsc UNION ALL SELECT NULLIF ('', 0) AS Expr1, ROUND((SELECT value FROM donut) - (SELECT SUM([Budget Estimates 2017-18]) AS FUNDWISE FROM [budgetbook-17-18] AS [budgetbook-17-18_2] WHERE (Cost_ctr = @cost2)) / (SELECT SUM([Budget Estimates 2017-18]) AS costwise FROM [budgetbook-17-18] AS [budgetbook-17-18_1] WHERE (Fund = @fund2)) * 100, 0) AS Totalbudgetofsc">
                              <SelectParameters>
                                  <asp:ControlParameter ControlID="costcenter" Name="cost1" PropertyName="Text" />
                                  <asp:ControlParameter ControlID="scnum" Name="fund1" PropertyName="Text" />
                                  <asp:ControlParameter ControlID="costcenter" Name="cost2" PropertyName="Text" />
                                  <asp:ControlParameter ControlID="scnum" Name="fund2" PropertyName="Text" />
                              </SelectParameters>
                          </asp:SqlDataSource>
Back to Top