Build 4.0.0.81 of xlsgen adds native support for Lorenz curves. Those charts are unknown to Excel so this is an original concept meant to match everyday needs.
Lorenz curveThe Lorenz curve (named after Max Lorenz) represents the dispersion of inequalities, usually income, but not only. Wikipedia
article.
Points on the Lorenz curve represent statements like "
the bottom 20% of all households have 10% of the total income.". A perfectly equal income distribution would be one in which every person has the same income (ideal curve displayed for comparison purposes). The Lorenz curve is always below the ideal curve.
The data points on the horizontal axis shows the cumulated population and the data points on the vertical axis shows the cumulated income (or any other measure).
The chart example above is made from the following data :
| Population | % Population | % Cumulated Population | Income | % Income | % Cumulated Income |
South | 43062 | 36.87% | 36.87% | 47961 | 34.06% | 34.06% |
Midwest | 26266 | 22.49% | 59.36% | 52209 | 22.62% | 56.68% |
Northeast | 21351 | 18.28% | 77.65% | 54283 | 19.12% | 75.80% |
West | 26105 | 22.35% | 100.00% | 56218 | 24.20% | 100.00% |
The Lorenz curve can be created from just raw Population and Income data, as is found in public files (government).
xlsgen orders the data, computes cumuls and draws the line.
C/C++ code |
xlsgen::IXlsChartPtr chart1 = worksheet->NewChart(xlsgen::charttype_lorenzcurve, row1, col1, row2, col2); xlsgen::IXlsChartDynamicDataSourceSeriesPtr serie1 = chart1->DynamicDataSource->AddSerie(); serie1->DataLabelsFormula = L"={43062;26266;21351;26105}"; serie1->SeriesValuesFormula = L"={47961;52209;54283;56218}";
|