Module:Chart absolute to relative/doc
This module provides utility functions for transforming tabular data sets in chart renderings.
See mw:Extension:Chart/Transforms for more documentation on this transform feature of the Charts system.
See similar module: Module:ChartPercentage
Usage
convert_to_percentage: convert the data to percentages, relative to a base value column
To use as a chart transform:
"transform": {
"module": "Chart absolute to relative",
"function": "convert_to_percentage",
"args": {
"sum_column": "2",
"units": "percent",
"decimals": "2"
}
},
Arguments:
sum_column: column number of the sum value of the row (lua arrays are 1-based arrays)units: percentdecimals: rounding