Dynamically get the data and show the ranks according to the data

6 posts, 0 answers
  1. Mani
    Mani avatar
    6 posts
    Member since:
    Nov 2013

    Posted 03 Dec 2013 Link to this post

    Hello,


    How i got the data from database and now how do i show the data in the html chart 
    http://demos.telerik.com/aspnet-ajax/htmlchart/examples/databinding/loadingdata/defaultcs.aspx ), not by using xml data source.. 
    i am actually showing the rank of the person  <%= Locality %> now i need to embed all the data in the chart..
    How do i do that?

    attachment is my previous code.. 

    Thanks.

  2. Mani
    Mani avatar
    6 posts
    Member since:
    Nov 2013

    Posted 03 Dec 2013 Link to this post

    Hello,


    I got the data from database and now how do i show the data in the html chart 
    http://demos.telerik.com/aspnet-ajax/htmlchart/examples/databinding/loadingdata/defaultcs.aspx ), not by using xml data source.. 
    i am actually showing the rank of the person  <%= Locality %> now i need to call the value to the chart..
    How do i do that?

    attachment is my previous code.. 

    Thanks.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 09 Dec 2013 Link to this post

    Hi Mani,

    I am not quite sure whether I understand the scenario correctly. Could you, please, provide ?
    • If you want to bind the HTMLChart to a database assigning to it specific values from the data tables, you can see how this could be done here: SqlDataSource
    • If you want to create the HTMLChart dynamically, accessing values from the code behind, you can refer the following live demo: Programmatic Chart Creation

    If non of the above is the case, could you, please, provide more detailed information on what exactly do you want to achieve?

    Regards,
    Veselina Raykova
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  5. Mani
    Mani avatar
    6 posts
    Member since:
    Nov 2013

    Posted 11 Dec 2013 Link to this post

    yes, 
     I got the values from the database in a dataset..  i am showing the that retrieved values in a table using <%= value %>, now i need to show the values in the html chart so that i can get the graph of it. 
    Let me know if i need to be more clear.
    Thanks.
  6. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 13 Dec 2013 Link to this post

    Hi Mani,

    Thank you for the clarification, bu unfortunately  RadHtmlChart cannot work with Eval expressions. In order to bind the control to a database you have to use a data source control (e.g., SqlDataSource, ObjectDataSource, LinqSqlDataSource, EntityDataSource) in the way shown in this live demo. You can control the data source and the columns of it which will be used for the HtmlChart with the following properties:
    • DataSourceID in the main tag sets the declarative data source for the entire chart. The DataSource property can be used for a programmatic data source if you create the connection in the code-behind
    • DataFieldY for the series to point it to the desired column of the data table
    • DataLabelsField for the x-axis labels to populate the items for the axis

    If you are using the chart into a template of a databinding control, you can access the HtmlChart in its parent OnItemBound event and configure its values in it.

    I hope this information will be helpful for you.

    Regards,
    Veselina Raykova
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  7. Mani
    Mani avatar
    6 posts
    Member since:
    Nov 2013

    Posted 15 Dec 2013 Link to this post

    Thanks :) this will help me out. 
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017