This is a migrated thread and some comments may be shown as answers.
Age pyramid
2 Answers 43 Views
This is a migrated thread and some comments may be shown as answers.
Tobania
Top achievements
Rank 1
Tobania asked on 10 Apr 2013, 07:11 AM
Hey,

We are looking for a special chart type or a way to make an age pyramid.

The following link shows an example of the chart we are looking for.

http://www.infovis.net/imagenes/T1_N158_A841_AgePyramid.gif

Is there any way to create a chart like this ? 

Thanks
Sodi We

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 12 Apr 2013, 01:51 PM
Hi Sodi,

Check out the attached sample report definition I have used the AdventureWorks database, thus you may have to modify the connection string. Here are the required steps to setup age pyramid chart type:

  1. From the Insert tab start the Stacked Bar Chart wizard;
  2. Set up the datasource;
  3. Set Gender field for Series;
  4. Set Years field for Categories;
  5. Set Count(Fields.Years) expression for Value;
  6. Click Finish;
  7. Now you have to make some changes with the Property Window;
  8. Select the Graph Series and change the Series X value expression =Count(Fields.Years) to =IIF(Fields.Gender = "M", -Count(Fields.Years), Count(Fields.Years))  ;
  9. Select the Graph X Axis and set the LabelFormat to {0:##;##}  . This will remove the minus sign from the axis labels;
  10. Optionally if you want the Y axis to show age ranges, you can change the CategoriesGroups (yearGroup1) Grouping expression as we have done.

All the best,
Peter
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Jack
Top achievements
Rank 1
answered on 20 Apr 2016, 03:52 PM
Thanks, this helped me get a working example going fairly easily.  I ended up using {0:#,#;#,#} for the LabelFormat option.  This adds commas to the axis value labels.
Asked by
Tobania
Top achievements
Rank 1
Answers by
Peter
Telerik team
Jack
Top achievements
Rank 1
Share this question
or