From a5fb389ff074e966065a4425f31315c8f1a8a21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 23 Jan 2018 14:31:09 +0100 Subject: [PATCH 1/3] Minor formatting in dashboard readme --- docs/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/README.md b/docs/README.md index 730559ac..d7ade1cb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -46,10 +46,10 @@ For details on how each kind of chart is rendered, take a look at [`charts.js`]( | option | values | description | |---|---|---| -| `series ` | array of strings | only include these data series and drop all others (referenced by TSV table headings) | -| `visibleSeries ` | array of strings | only show the listed data series and hide all others initially (referenced by TSV table headings) | -| `sliceData ` | array `[t0, t1]` | slice the data from the TSV file as if `data.slice(t0, t1)` was called | -| `aggregate ` | weekly | if set to `weekly`, aggregate the data by week by computing the sum of the values within each week | +| `series ` | array of strings | only include these data series and drop all others (referenced by TSV table headings) | +| `visibleSeries ` | array of strings | only show the listed data series and hide all others initially (referenced by TSV table headings) | +| `sliceData ` | array `[t0, t1]` | slice the data from the TSV file as if `data.slice(t0, t1)` was called | +| `aggregate ` | weekly | if set to `weekly`, aggregate the data by week by computing the sum of the values within each week | ##### List Charts From f0aa1392f1f6e385e0e3ddd54cbcb07c5c7da472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Mon, 22 Jan 2018 18:10:18 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Make=20the=20=E2=80=9Craw=20data=E2=80=9D?= =?UTF-8?q?=20button=20optional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This introduces a new configuration option “showRawDataLink,” through which the “raw data” button can be explicitly hidden. This is used for hiding the “raw data” download button in the collaboration chart, where the raw data isn’t useful to view or edit in a spreadsheet application. Additionally, the documentation is extended to cover the new option. --- docs/README.md | 1 + docs/assets/js/charts.js | 2 +- docs/index.html | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index d7ade1cb..f4f0576a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -50,6 +50,7 @@ For details on how each kind of chart is rendered, take a look at [`charts.js`]( | `visibleSeries ` | array of strings | only show the listed data series and hide all others initially (referenced by TSV table headings) | | `sliceData ` | array `[t0, t1]` | slice the data from the TSV file as if `data.slice(t0, t1)` was called | | `aggregate ` | weekly | if set to `weekly`, aggregate the data by week by computing the sum of the values within each week | +| `showRawDataLink` | `true`, `false` | show the link to download the chart’s raw data (default: `true`) | ##### List Charts diff --git a/docs/assets/js/charts.js b/docs/assets/js/charts.js index f8503b76..ca6b9652 100644 --- a/docs/assets/js/charts.js +++ b/docs/assets/js/charts.js @@ -820,7 +820,7 @@ $(window).bind('load', function() const infoBoxes = $(chartPlaceholder).find('.info-box'); // Put a bar with the title and additional actions before the chart container - if ($(charts.first()).attr('data-url')) + if (readConfig($(charts.first()), 'showRawDataLink') != false && $(charts.first()).attr('data-url')) { titles.insertBefore(chartPlaceholder).wrapAll( '
'); diff --git a/docs/index.html b/docs/index.html index e3fc09b4..7d76eb97 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,6 +11,7 @@

Collaboration Across Organizations

height="1000" data-url="{{ site.dataURL }}/org-collaboration.tsv" data-type="chord" + data-config='{"showRawDataLink": false}' >

From 864ade53051b74caa1b28420fde830e71e6d2276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 23 Jan 2018 14:14:21 +0100 Subject: [PATCH 3/3] Fix incorrect title margins The margins of chart titles were incorrect in the case that the corresponding action bar was hidden. This change applies the same style to all titles, regardless of whether an action bar is shown or not. --- docs/assets/css/stylesheet.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/assets/css/stylesheet.css b/docs/assets/css/stylesheet.css index 1e262b64..68960a44 100644 --- a/docs/assets/css/stylesheet.css +++ b/docs/assets/css/stylesheet.css @@ -399,6 +399,11 @@ a width: 100%; } +.row h3 +{ + margin: 0; +} + .info-box { background-color: #f5f5f5; @@ -643,11 +648,6 @@ a margin-bottom: 1rem; } -.action-bar h3 -{ - margin: 0; -} - button, a.button {