You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,3 +4,42 @@ This is the github repo for the official TMD widgets and user instructions
4
4
5
5
## Summary statistics widget
6
6
7
+
This widget allows users to incorporate summary statistics charts into their own websites. Any changes in the TMD will then be reflected automatically on the users website.
8
+
9
+
### Setup
10
+
11
+
Add the following code snippets to your own website:
12
+
13
+
Insert the below snippet where on the website you want the widget to be:
console.error('TMDWidget failed to initialise', error);
28
+
});
29
+
</script>
30
+
```
31
+
32
+
The following parameters are customizable for the widget:
33
+
34
+
* questions: A list of question slug ids for displaying. You can find the question slug in the admin panel in the TMD. If defined, questions are displayed in the order they are inputed.
35
+
* questionSets: A list of questionSets for displaying. If defined, all questions in the questionSet will be displayed. questionSets are listed by their slug.
36
+
37
+
Either questionSets can be set, or questions, not both. In case of both
38
+
being defined, questionSets take precedence. If neither questionSets nor questions
39
+
are defined, all questionSets will be returned.
40
+
41
+
* chartType: Define what chart type results should be shown in. Valid choices
42
+
are 'pie' and 'bar'. Defaults to 'pie' if not defined.
43
+
* colors: A list of hex colors to be used for plotting. Defaults to ELIXIR colors
44
+
* endpoint: The API endpoint to get the data from. Defaults
0 commit comments