Custom Palette for a single data series

Thread is closed for posting
2 posts, 0 answers
  1. Alex
    Alex avatar
    8 posts
    Member since:
    Apr 2013

    Posted 23 May 2013 Link to this post

    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>
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 28 May 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top