Custom ChartAggregateFunction

4 posts, 0 answers
  1. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 22 Mar 2010 Link to this post

    Hello

    Is there a way to create a custom ChartAggregateFunction.

    Scenario:
    I need to chart the aggregate average based on grouped data from 2 columns in a gridview. ie (column1 - column2) / column2

    Any help would be great.

    Nick
  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 24 Mar 2010 Link to this post

    Hello Nick,

    I am afraid RadChart does not support this type of aggregate functions. Actually, this would be more like "Calculated series" but not an aggregate function. You can achieve it by wiring ItemDataBound and modifying the YValue of the DataPoint in the event handler:

    void RadChart1_ItemDataBound(object sender, Telerik.Windows.Controls.Charting.ChartItemDataBoundEventArgs e)
            {
                MyCalcData dataItem = e.DataItem as MyCalcData;
                e.DataPoint.YValue = (dataItem.MyProperty1 - dataItem.MyProperty2) / dataItem.MyProperty2;
            }

    Unfortunately, I have some bad news -- the above code is not applicable at the moment due to a bug in the control. Our developers assured me that the bug will be fixed in the next internal build, which will be available on Friday and you will be able to test it. Please, accept our apologies for the inconvenience. I have updated your Telerik points as your question led us to a bug in RadChart.

    Sincerely,
    Ves
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 29 Mar 2010 Link to this post

    Took about 1 hours to update all binaries and re reference in all modules to latest internal build:
    Silverlight_2010_1_0326

    but when I try to show a module that contains a RadDocking control (I think this is what is unique about this module) I get:

    Unhandled Error in Silverlight Application
    Code: 2012    
    Category: ParserError       
    Message: Unknown attribute ContentTemplateSelector on element ContentPresenter.     
    File:      
    Line: 17     
    Position: 90

    Is there an easier way to update to a new build?

    Please help as this is costing me alot of time



  4. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 30 Mar 2010 Link to this post

    Hello Nick,

     There is a problem in the Docking assembly. We will fix it for the next internal build. We apologize for the inconvenience caused.

    All the best,
    Miroslav Nedyalkov
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
Back to Top