hi all again, i asked you about muptiple line series in radchart in this post: https://www.telerik.com/forums/multiple-line-series-radhtmlchart
I created RadHtmlChart with the same parameters as previous post and using SqlDataSource. And this is my ASPX code:
This is my C# code with setting RadHtmlChart:
Bellow i will attach two picture:
1. what i have right now in RadHtmlChart with one LineSeries
2. the same structure table from database, where i need only a column "sensor_type" for multiple LineSeries in RadHtmlChart.
Thank you for your attention, i hope you will help me, and sorry for two similar post
7 Answers, 1 is accepted
I advise that you review the information I provided in the other thread to see how to data bind a RadHtmlChart. It is important to add that it does not have server-side events: https://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/troubleshooting/known-issues/known-limitations. If you will be creating series dynamically, you must set their properties when you create them, you cannot do this in a DataBoud-type server event.
The following sample shows one way you can group the data source so it gets split into the separate fields the chart needs: https://www.telerik.com/support/code-library/group-radhtmlchart-data-source.
thank u, Marin Bratanov, for answer.
so i understand correctly that this is impossible make with help SqlDataSource or other DataBound? Just like manually?
than You for answer
It is possible, and you can data bind multiple series to a chart through an SqlDataSource.
What is important is that you provide data in the proper shape to the chart, as described in the following documentation article: https://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/data-binding/overview.
If you cannot provide such shape from the database, you need to write some additional code in order to create the needed shape programmatically, as shown in the following post: https://www.telerik.com/support/code-library/group-radhtmlchart-data-source.
This will allow you to data bind multiple series.
hi , Mark Bratanov, thank you for answer