How to use PaletteBrushes in drilldown charts

2 posts, 0 answers
  1. Ragavan
    Ragavan avatar
    3 posts
    Member since:
    Mar 2012

    Posted 06 Jan Link to this post

    I am using drilldownchart(RadChart Hierarichal Chart). I would like to use different colors for bars. I am getting same gradient color for all bars. Please find the current working chart screenshot and expected. 


    Can we use pallette to show different colors in drill down chart. If so please provide details and some sample project.

     Please find my XAML code here 

    <Window x:Class="DrillDownHierarchicalView.MainWindow"
    <telerik:RadChart x:Name="radChart">
    <telerik:ItemMapping FieldName="Sales.TotalAmount"
    DataPointMember="YValue" />
    <telerik:ItemMapping FieldName="Name"
    DataPointMember="XCategory" />
    <telerik:PropertyRelation ParentPropertyName="Sales" />
    <telerik:GroupingSettings ShouldFlattenSeries="True">
    <telerik:ChartGroupDescriptor Member="Model" />
    <telerik:ItemMapping FieldName="Amount"
    AggregateFunction="Sum" />
    <telerik:ItemMapping FieldName="Model"
    DataPointMember="XCategory" />

  2. Dinko
    Dinko avatar
    182 posts

    Posted 11 Jan Link to this post

    Hi Ragavan,

    We can see that you are using RadChart in your example.This control has known issues and limitations. That's why we recommend using the RadChartView suite instead of RadChart. The new charting components have better implementation and improved performance. You can read more about the difference between them in our RadChart vs. RadChartView help article.

    As for your case, RadChartView doesn't support drill-down feature out of the box. However, you can implement it with custom code. You can find a runnable project in our GitHub repository which demonstrates how to implement this functionality.

    With RadChartView,  you can use the BarSeries element to draw bars. There are several ways to colorize bar series as you'll find in our Styling the Chart Series help article. In brief, you might either Create Custom Palette (like in your case) or you can bound each DataPoint item color to a property from your ViewModel which is further described in Binding the Color of Series Items help article.

    Please, give the new charting control a try and let us know if you need any further assistance.

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top