Declined
Last Updated: 11 Jun 2016 04:43 by Pratik
Pratik
Created on: 31 May 2016 10:25
Category: HtmlChart
Type: Feature Request
0
radhtmlchart add multiple series from code behind
I need to bind RadhtmlChart from code behind using sql store procedure. 

e.g I'm having one table in which first column is containing Month Year data and others column are auto generated as per store data for specific type. I want to bind RadhtmlChart with this datasource. with specific color for series.

P.S table screen shot... column number can be increases of decreases as per data...




Attached Files:
2 comments
Pratik
Posted on: 11 Jun 2016 04:43
It was my bad I asked my technical question over here. I'm new on telerik controls. from next time i'll on forum or will open support ticket.


many thanks for the solution.. I already worked as per you have provided solution and it is working fine with me..


ADMIN
Danail Vasilev
Posted on: 10 Jun 2016 14:19
First let me start with the fact that the feedback portal is related to logging and tracking issues, improvements and feature requests with the controls and not about asking technical questions. That being said  when you have technical questions in future, I would like to ask you to use the corresponding channels for that:
   1) Either open a support ticket which requires a subscription or a trial account.
   2) Or ask our community in the forum - http://www.telerik.com/forums/aspnet-ajax
Now back to your technical question.
To create a chart with multiple series from the data you should initially loop through the data source fields and see how much series you will create. After that you can add  programmatically the series to the chart based on that number and set their DataFieldY property which should refer to the corresponding data source field name. Last you can simply pass the data source to the chart and call its DataBind method. You can also find useful the following resources:
    1) How to create the chart programmatically - http://demos.telerik.com/aspnet-ajax/htmlchart/examples/serversideapi/programmaticcreation/defaultcs.aspx
    2) How to bind the chart from the code behind - http://demos.telerik.com/aspnet-ajax/htmlchart/examples/databinding/bindtodataset/defaultcs.aspx