Module:Select columns/sandbox/doc
This is a module for mw:Extension:Chart/Transforms, which allows subsets of tabular data to be shown in a chart.
Usage
The module has two functions, show, which only shows the selected columns, and hide, which hides the selected columns. The columns to show or hide are passed via args. They columns can be passed individually, where the name of the argument is a string containing the 1-indexed column number and the value is any string value (including the empty string ""), and/or via a min and/or max argument whose value is a string containing the column number.
For a chart with eight columns, all of the below examples would only show columns 1, 5, 6, and 7:
"transform": {
"module": "Select columns",
"function": "show",
"args": {
"1": "",
"5": "",
"6": "",
"7": ""
}
}
"transform": {
"module": "Select columns",
"function": "show",
"args": {
"max": "1",
"5": "",
"6": "",
"7": ""
}
}
"transform": {
"module": "Select columns",
"function": "show",
"args": {
"1": "",
"min": "5",
"max": "7"
}
}
"transform": {
"module": "Select columns",
"function": "hide",
"args": {
"2": "",
"3": "",
"4": "",
"8": ""
}
}
"transform": {
"module": "Select columns",
"function": "hide",
"args": {
"2": "",
"3": "",
"4": "",
"min": "8"
}
}
"transform": {
"module": "Select columns",
"function": "hide",
"args": {
"min": "2",
"max": "4",
"8": ""
}
}