6 Answers, 1 is accepted
For a data-bound chart you can use the ColorField property (http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/custombarcolor/defaultcs.aspx), while for a programmatically created chart you can use the BackgroundColor property of the item:
Thanks, where do I use the programmatic approach, when I used it in the routine that builds my charts I got this error:
(chtUsers.PlotArea.Series as LineSeries) - The type or namespace name 'LineSeries' is not valid in this scope
You should use the Telerik namespace:
You can also add it to Visual Studio with a short cut - click on the unknown word (LineSeries) and press CTRL + "."
The problem wasn't the Telerik.web.ui reference, I think it was because mine is a ColumnChart so I used this code:
The problem is that although my ColumnSeries is valid, it's SeriesItems is empty - I have just posted a support ticket for the same problem.
I have answered your ticket and I am pasting my response here for anyone else that may have a similar question and stumble on this thread:
RadHtmlChart works entirely on the client, so it also binds on the client to its data, so the server items collection is empty, and this is the expected behavior of the control: http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/troubleshooting/known-issues/known-limitations.