This is a migrated thread and some comments may be shown as answers.

Change color of static item

1 Answer 37 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Henrik
Top achievements
Rank 2
Henrik asked on 02 Nov 2013, 12:47 PM
Hello.

I have a scenario where I need to draw a RED line as an upper marker like in this example.
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/databinding/staticitems/defaultcs.aspx

The line itself is no problem, but can I change the color when making the series programically?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 04 Nov 2013, 10:28 AM
Hi Henrik,

The main color of a series is under its Appearance inner element - the Fill Style element has a BackgroundColor property: http://www.telerik.com/help/aspnet-ajax/htmlchart-server-side-api-configure-series.html. You can set it either in markup, or in code-behind, e.g.:
markup:
<telerik:LineSeries>
    <Appearance>
        <FillStyle BackgroundColor="Red" />
    </Appearance>
</telerik:LineSeries>
code-behind:
LineSeries ls = new LineSeries();
ls.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.Red;



Regards,
Marin Bratanov
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.
Tags
Chart (HTML5)
Asked by
Henrik
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Share this question
or