5 Answers, 1 is accepted
If I understand correctly your question you are trying to programmatically declare XAxis items to the chart.
If this is the case I am attaching a simple example where I am using a dataset.
What I do is bind the dataset to the RadHtmlChart and then tell the XAxis Labels which column to get from the dataset through the DataLabelsField property:
You can also set this property in the markup of the control.
In case you are creating the entire chart programmatically you can take a look at the following examples and use them as a starting point for your implementation:
http://www.telerik.com/help/aspnet-ajax/htmlchart-use-explicit-items.html - see the second section
All the best,
the Telerik team
no single series..
A single series uses the same color for all its items by design. The concept is that these items have to be grouped by this color so that the reader can easily identify this. The feature of modify colors for separate items within a series is logged and you can follow it, vote and comment in this URL.
On using more than one series - you can add as much series as you want. I am giving you an example with two series.
The change in the markup could look like:
Where "Price1" is the data for the first ColumnSeries and "Price2" is the data for the second ColumnSeries.
In the code behind I am inserting another column "Price2" (in orange color) for the second series and its values (in yellow color).
Please find attached the whole example.
the Telerik team
How can you do this but without knowing which columns you have? In your dataset you define them on code and I can't have that. Please check my question at https://www.telerik.com/forums/multiple-column-series-per-date
I have just answered your other post on the same matter, please, refer my answer here: