diff --git a/.github/contributing/adding-tlg.md b/.github/contributing/adding-tlg.md new file mode 100644 index 0000000..516fcb1 --- /dev/null +++ b/.github/contributing/adding-tlg.md @@ -0,0 +1,64 @@ +# Adding new Tables, Listing and Graphs +In order to add new TLGs, two things are needed: +### TLG definition +Specified in [tlg.yaml](../../inst/shiny/tlg.yaml) file. Entry in that file is responsible for providing some metadata regarding the TLG (like name, descriptions, links), a function reference for creating the resulting TLG and options, taken as arguments by the generating function, that allow for quick and easy definition of widgets to be rendered in the application UI. This then allows the user to customize plots in accordance to their needs. + +### `R` function +The code that creates the actual results. + +## Listings +Currently not implemented. + +## Tables +Currently not implemented + +## Graphs +### yaml +The `Graph` entry should have the following format. Identifying keys (wrapped in `<>`) should be provided by the creator and be unique within their scope (indentation level). + ```yaml +# unique identifier for given entry +: + # true / false whether TLG should be included as default + is_default: + # type of the TLG, in this case must be Graph + type: + # name of the dataset + dataset: + # standarized id of the TLG, e.g. pkcg01 + pkid: + # short label to be displayed as tab name + label: + # longer descriptions, to be displayed in the order table + description: + # link to the documentation of the TLG + link: + # name of the function exported by the package, responsible for generating TLG, must return a list of plots to be displayed + fun: + # options that can be passed as arguments to the function + options: + # option id, the same as the argument that is passed to the rendering function, must be unique in the scope of the TLG entry +