Build 4.0.0.9 of xlsgen adds support for creating Excel 2016 treemap charts. As the name implies, these are Excel 2016 charts in that only Excel 2016 will render those charts, no older Excel version will do. xlsgen reads, creates and writes such charts.
Treemap charts in xlsgenTreemap charts can be used to display values which are hierarchical in nature, using nested rectangles.
In the example above, we have a single series of values, which is the price column, and we would like to show how breakfasts are sorted out by price, and how lunches are sorted out by price. The display builds two separate collections from the same series, based on names from column A and column C, sorts them, according to column D, then displays the nested rectangles.
And here is how to create such chart (c#) :
IXlsChart chart = worksheet.NewChart(enumChartType.charttype_treemap,
10, //row1
2, //col1
25, //row2
10 //col2
);
IXlsChartDynamicDataSourceSeries s1 = chart.DynamicDataSource.AddSerie();
s1.SeriesValuesFormula = "=Sheet1!$D$2:$D$13";
s1.DataLabelsFormula = "=Sheet1!$A$2:$C$13";