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

Radhtml chart with different colors in columns

1 Answer 372 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Dayvee Jake
Top achievements
Rank 1
Dayvee Jake asked on 19 Aug 2015, 03:22 PM

Hi Community forum,

I am having a difficult problem with changing the colors of the columns. Here's my html  source

<telerik:RadHtmlChart ID="RadHtmlChart2" runat="server" DataSourceID="SqlDataMyStat">
                                        <PlotArea>
                                            <Series>
                                                <telerik:ColumnSeries DataFieldY="Activities" Name="Activities">
                                                    <Appearance>
                                                        <FillStyle BackgroundColor="#30abf2" />
                                                    </Appearance>
                                                </telerik:ColumnSeries>
                                            </Series>
                                            <XAxis DataLabelsField="Status">
                                                <LabelsAppearance RotationAngle="60" />
                                                <TitleAppearance Text="Status" />


                                            </XAxis>
                                            <YAxis>
                                                <TitleAppearance Text="Activities" />

                                            </YAxis>
                                        </PlotArea>
                                        <Legend>
                                            <Appearance Visible="false" />
                                        </Legend>


                                    </telerik:RadHtmlChart>
                                                
                                                
                                            </XAxis>
                                            <YAxis>
                                                <TitleAppearance Text="Activities" />
                                                
                                            </YAxis>
                                        </PlotArea>
                                        <Legend>
                                            <Appearance Visible="false" />
                                        </Legend>

    </telerik:RadHtmlChart>

 

I would like to achieve that the Activities columns with respect to Status would be different colors per column parse..

here's the query from datasource

Status (x-axis)                                   Activities (y-axis)

Active                                                      30

On-Hold                                                   15

Closed                                                      19

 Thank you in advance for your kind suggestions/solutions...

 

 

 

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 24 Aug 2015, 05:57 AM
Hello Dayvee,

You should use the ColorField property of the series. See an example here - http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/custombarcolor/defaultcs.aspx

Regards,
Danail Vasilev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart (HTML5)
Asked by
Dayvee Jake
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or