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

Applying additional grouping after data is bound to chart

1 Answer 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Kniskern
Top achievements
Rank 1
Michael Kniskern asked on 13 Sep 2012, 04:16 PM
I am fairly new to Telerik reporting and I am trying to design a horizontal bar chart group by several items.  Here is the structure of my data source

public class SurveySummaryFindingGlobal
{
        public int SurveyId { get; set; }
        public int TotalNumberSurveyed { get; set; }
        public int TotalNumberResponsed { get; set;}
        public System.DateTime DistributionStartDate { get; set; }
        public System.DateTime DistributionEndDate { get; set; }
        public List<SurveyDept> Departments { get; set; }
        public List<SurveySummaryFindingDetail> ReportSummaryLineItem { get; set; }
}
 
public class SurveySummaryFindingDetail
{
        public decimal Percentage { get; set; }
        public int TotalResponses { get; set; }
        public int SurveyGroupID { get; set; }
        public int SurveyQuestionID { get; set; }
        public string SurveyGroupName { get; set; }
        public string QuestionResponse { get; set; }
        public string QuestionText { get; set; }
}

The datasource of my chart object is the ReportSummaryLineItem  property of the SurveySummaryFindingGlobal object.  I was able to create a ChartSeries item using the the Percentage
property of the SurveySummaryFindingDetail object through the Telerik reporting designer.  After I bind
the data source to the chart object, I want to group the chart by SurveyGroupName because there are
multiple data rows with the same SurveyGroupName value.  Also, I want to create CustomPalette using the
QuestionResponse property of the SurveySummaryFindingDetail because I want to display the percentage
per QuestionResponse (1,2,3,4,5,8,9).

I have attached a current screenshot of where I stand with the chart object. (The chart bat items are
clustered close together, still trying to learn the telerik reporting framework)

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 18 Sep 2012, 11:17 AM
Hi Michael,

The data can be automatically grouped into series by setting the DataGroupColumn property. When this property is set, the series will be created automatically but you will have no control over the series and you will not be able to customize them. For e.g. you won't be able to bind the X Value and all items of a series will start always from the beginning. If that approach doesn't suit your needs, you have to create the series and items programmatically.
For more info see:  To use custom palettes you have to cover a couple of steps:
  1. Add a custom palette to the CustomPalettes property of the chart
  2. Specify which palette to use for the series from SeriesPalette property of the chart
 
Kind regards,
Elian
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Michael Kniskern
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or