Build 4.0.0.7 of xlsgen adds support for creating Excel 2016 waterfall 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.
Waterfall charts in xlsgenWaterfall charts can be used for showing differences between values. When the current value is higher than the previous value, a positive color is used (first color in the current theme). And when the current value is lower than the previous value, a negative color is used. By showing those color-coded differences over the entire series, it is possible to visualize how the value is evolving over time. Stock tick charts are often waterfall charts.
Special values can be used and formatted accordingly to rebase the differences, often for showing a total in the values. For this to work, a boolean property called
WaterfallRebase
in the
IXlsChartDataElement interface is available, i.e. the i-th data point of a given series of values.
And they are very simple to create :
IXlsChart chart = worksheet.NewChart(enumChartType.charttype_waterfall,
10, //row1
2, //col1
25, //row2
10 //col2
);
IXlsChartDynamicDataSourceSeries s1 = chart.DynamicDataSource.AddSerie();
s1.SeriesValuesFormula = "=Sheet1!$A$1:$A$9";