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

Custom Palette for a single data series

1 Answer 87 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 23 May 2013, 09:12 PM
I have a custom palette I'd like to use for my Rad Chart. The problem is that only one color gets used per bar. I'm assuming this is because I only have one data series. How to get configure the chart to use a different color for each bar?

Here's my current chart configuration:

<telerik:RadChart runat="server" ID="rc1" DefaultType="Bar" DataSourceID="sds1"
               SeriesOrientation="Horizontal" Width="500px" Height="500px">
              <PlotArea>
                 <Appearance Dimensions-AutoSize="false" Dimensions-Width="400px" Dimensions-Height="400px" Dimensions-Margins="50px" FillStyle-MainColor="72, 102, 137" FillStyle-SecondColor="72, 102, 137">
                 </Appearance>
                 <XAxis Appearance-ValueFormat="General" DataLabelsColumn="Company" Visible="True" Appearance-TextAppearance-TextProperties-Color="Black"></XAxis>
                 <YAxis Appearance-TextAppearance-TextProperties-Color="Black"></YAxis>
               </PlotArea>
               <Series>
                <telerik:ChartSeries DataYColumn="Count">
                    <Appearance>
                            <LabelAppearance>
                                <Shadow Blur="0" Distance="0"  Color="Transparent"/>
                            </LabelAppearance>
                        </Appearance>
                </telerik:ChartSeries>
               </Series>
               <Appearance Dimensions-AutoSize="false" Border-Visible="false">
                  <Shadow Blur="5" Distance="3" />
               </Appearance>
                <Legend Visible="false"></Legend>
                <ChartTitle Visible="true" Appearance-Dimensions-AutoSize="false" Appearance-Dimensions-Width="315px" Appearance-Dimensions-Height="40px"
                  Appearance-Dimensions-Margins="0px" Appearance-Dimensions-Paddings="0px" TextBlock-Text="Chart1" Appearance-Position-Auto="false"
                  Appearance-Position-X="5" Appearance-Position-Y="5" Appearance-Shadow-Color="Transparent"></ChartTitle>
             </telerik:RadChart>

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 28 May 2013, 01:47 PM
Hi Alex,

Chart Palettes colors are applied on series as a whole and not on individual series items. In order to make the chart use different colors for each bar, you will need to manually assign colors on the individual items. Please check this help topic for an example of that. Note that the RadChart.SeriesPalette property should not be set.

I hope this helps.

Regards,

Petar Kirov
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 their blog feed now.
Tags
Chart (Obsolete)
Asked by
Alex
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or