Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: safetyGraphics
Title: Create Interactive Graphics Related to Clinical Trial Safety
Version: 0.9.0
Version: 0.9.1
Authors@R: c(
person("Jeremy", "Wildfire", email = "jeremy_wildfire@rhoworld.com", role = c("cre","aut")),
person("Becca", "Krouse", role="aut"),
Expand All @@ -18,11 +18,11 @@ License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
Suggests:
Suggests:
testthat,
shinytest,
knitr
Imports:
Imports:
dplyr,
htmlwidgets,
purrr,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[![Travis-CI Build Status](https://travis-ci.org/ASA-DIA-InteractiveSafetyGraphics/safetyGraphics.svg?branch=master)](https://travis-ci.org/ASA-DIA-InteractiveSafetyGraphics/safetyGraphics) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/safetyGraphics)](https://cran.r-project.org/package=safetyGraphics)
[![Travis-CI Build Status](https://travis-ci.org/SafetyGraphics/safetyGraphics.svg?branch=master)](https://travis-ci.org/SafetyGraphics/safetyGraphics) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/safetyGraphics)](https://cran.r-project.org/package=safetyGraphics)

# safetyGraphics: Clinical Trial Safety Graphics with R <img src="inst/safetyGraphicsHex/safetyGraphicsHex.png" width = "175" height = "200" align="right" />

Expand Down
8 changes: 4 additions & 4 deletions inst/htmlwidgets/eDISH.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ dependencies:
src: htmlwidgets/lib/d3-3.5.17
script: d3.v3.min.js
- name: webcharts
version: 1.11.1
src: htmlwidgets/lib/webcharts-1.11.1
version: 1.11.3
src: htmlwidgets/lib/webcharts-1.11.3
script: webcharts.js
stylesheet: webcharts.css
- name: safety-eDish
version: 0.16.2
src: htmlwidgets/lib/safety-eDISH-0.16.2
version: 0.16.3
src: htmlwidgets/lib/safety-eDISH-0.16.3
script: safetyedish.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
typeof exports === 'object' && typeof module !== 'undefined'
? (module.exports = factory(require('webcharts')))
: typeof define === 'function' && define.amd
? define(['webcharts'], factory)
: (global.safetyedish = factory(global.webCharts));
? define(['webcharts'], factory)
: (global.safetyedish = factory(global.webCharts));
})(this, function(webcharts) {
'use strict';

Expand Down Expand Up @@ -217,8 +217,8 @@
studyday_col: 'DY',
value_col: 'STRESN',
measure_col: 'TEST',
normal_col_low: 'STNRLO',
normal_col_high: 'STNRHI',
normal_col_low: null,
visit_col: null,
visitn_col: null,
group_cols: null,
Expand Down Expand Up @@ -407,8 +407,8 @@
label: filter.label
? filter.label
: filter.value_col
? filter.value_col
: filter
? filter.value_col
: filter
};

if (
Expand All @@ -432,8 +432,8 @@
label: group.label
? group.label
: group.value_col
? group.value_col
: filter
? group.value_col
: filter
};
if (
defaultDetails.find(function(f) {
Expand Down Expand Up @@ -464,8 +464,8 @@
label: detail.label
? detail.label
: detail.value_col
? detail.value_col
: detail
? detail.value_col
: detail
});
});
settings.details = defaultDetails;
Expand Down Expand Up @@ -718,8 +718,8 @@
label: filter.label
? filter.label
: filter.value_col
? filter.value_col
: filter
? filter.value_col
: filter
};
return filter;
});
Expand Down Expand Up @@ -922,7 +922,7 @@
/////////////////////////
// Remove invalid rows
/////////////////////////
var numerics = ['value_col', 'studyday_col', 'normal_col_low', 'normal_col_high'];
var numerics = ['value_col', 'studyday_col', 'normal_col_high'];
chart.imputed_data = chart.initial_data.filter(function(f) {
return true;
});
Expand Down Expand Up @@ -1864,10 +1864,10 @@
config.display == 'relative_uln'
? ' [xULN]'
: config.display == 'relative_baseline'
? ' [xBaseline]'
: config.display == 'absolute'
? ' [raw values]'
: null;
? ' [xBaseline]'
: config.display == 'absolute'
? ' [raw values]'
: null;

//Update axis labels.
config.x.label = config.measure_values[config.x.column] + unit;
Expand Down Expand Up @@ -2848,10 +2848,12 @@
visitn: config.visitn_col ? +m[config.visitn_col] : null,
studyday: +m[config.studyday_col],
value: +m[config.value_col],
lln: +m[config.normal_col_low],
lln: config.normal_col_low ? +m[config.normal_col_low] : null,
uln: +m[config.normal_col_high],
population_extent: measureObj.population_extent,
outlier_low: +m[config.value_col] < +m[config.normal_col_low],
outlier_low: config.normal_col_low
? +m[config.value_col] < +m[config.normal_col_low]
: null,
outlier_high: +m[config.value_col] > +m[config.normal_col_high]
};
obj.outlier = obj.outlier_low || obj.outlier_high;
Expand Down Expand Up @@ -3240,10 +3242,10 @@
([0, 4, 5, 6, 7, 8, 9].indexOf(lastDigit) > -1
? 'th'
: lastDigit === 3
? 'rd'
: lastDigit === 2
? 'nd'
: 'st');
? 'rd'
: lastDigit === 2
? 'nd'
: 'st');
return text;
})
.join(' and ') +
Expand Down Expand Up @@ -3673,7 +3675,7 @@
.style('font-size', '0.7em')
.style('padding-top', '0.1em')
.text(
'Points are shown for values above the current reference value. Mouseover a line to see the reference line for that lab.'
'Points are filled for values above the current reference value. Mouseover a line to see the reference line for that lab.'
);
}

Expand Down Expand Up @@ -3745,10 +3747,10 @@
config.display == 'relative_uln'
? 'Values are plotted as multiples of the upper limit of normal for the measure.'
: config.display == 'relative_baseline'
? "Values are plotted as multiples of the partipant's baseline value for the measure."
: config.display == 'absolute'
? ' Values are plotted using the raw units for the measure.'
: null;
? "Values are plotted as multiples of the partipant's baseline value for the measure."
: config.display == 'absolute'
? ' Values are plotted using the raw units for the measure.'
: null;

var axisLabels = chart.svg
.selectAll('.axis')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,300);
/*------------------------------------------------------------------------------------------------\
Small Multiple Layout
\------------------------------------------------------------------------------------------------*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
: typeof define === 'function' && define.amd
? define(['d3'], factory)
: (global.webCharts = factory(global.d3));
})(this, function(d3) {
})(typeof self !== 'undefined' ? self : this, function(d3) {
'use strict';
var version = '1.11.1';
var version = '1.11.3';

function init(data) {
var _this = this;
Expand Down Expand Up @@ -433,7 +433,7 @@
return f instanceof Date;
});
})
.entries(this.raw_data)
.entries(this.filtered_data)
.sort(function(a, b) {
return d3.min(b.values) - d3.min(a.values);
})
Expand Down Expand Up @@ -1592,7 +1592,7 @@
}

function makeLegend() {
var scale$$1 = arguments.length > 0 && arguments[0] !== undefined
var scale = arguments.length > 0 && arguments[0] !== undefined
? arguments[0]
: this.colorScale;
var label = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
Expand Down Expand Up @@ -1638,7 +1638,7 @@

var legend_data =
custom_data ||
scale$$1
scale
.domain()
.slice(0)
.filter(function(f) {
Expand Down Expand Up @@ -1670,7 +1670,7 @@
.attr('class', 'legend-item')
.style({ 'list-style-type': 'none', 'margin-right': '1em' });
new_parts.append('span').attr('class', 'legend-mark-text').style('color', function(d) {
return scale$$1(d.label);
return scale(d.label);
});
new_parts
.append('svg')
Expand All @@ -1695,16 +1695,16 @@

leg_parts.selectAll('.legend-color-block').select('.legend-mark').remove();
leg_parts.selectAll('.legend-color-block').each(function(e) {
var svg$$1 = d3.select(this);
var svg = d3.select(this);
if (e.mark === 'circle') {
svg$$1.append('circle').attr({
svg.append('circle').attr({
cx: '.5em',
cy: '.5em',
r: '.45em',
class: 'legend-mark'
});
} else if (e.mark === 'line') {
svg$$1.append('line').attr({
svg.append('line').attr({
x1: 0,
y1: '.5em',
x2: '1em',
Expand All @@ -1714,7 +1714,7 @@
class: 'legend-mark'
});
} else if (e.mark === 'square') {
svg$$1.append('rect').attr({
svg.append('rect').attr({
height: '1em',
width: '1em',
class: 'legend-mark',
Expand All @@ -1726,10 +1726,10 @@
.selectAll('.legend-color-block')
.select('.legend-mark')
.attr('fill', function(d) {
return d.color || scale$$1(d.label);
return d.color || scale(d.label);
})
.attr('stroke', function(d) {
return d.color || scale$$1(d.label);
return d.color || scale(d.label);
})
.each(function(e) {
d3.select(this).attr(e.attributes);
Expand All @@ -1743,7 +1743,7 @@
return d.label;
});

if (scale$$1.domain().length > 0) {
if (scale.domain().length > 0) {
var legendDisplay = (this.config.legend.location === 'bottom' ||
this.config.legend.location === 'top') &&
!this.parent
Expand Down Expand Up @@ -3335,8 +3335,8 @@
}

/*------------------------------------------------------------------------------------------------\
Check equality of two arrays (https://stackoverflow.com/questions/7837456/how-to-compare-arrays-in-javascript)
\------------------------------------------------------------------------------------------------*/
Check equality of two arrays (https://stackoverflow.com/questions/7837456/how-to-compare-arrays-in-javascript)
\------------------------------------------------------------------------------------------------*/

// Warn if overriding existing method
if (Array.prototype.equals)
Expand Down Expand Up @@ -3782,6 +3782,7 @@
}

function layout$4() {
//Add sort container.
this.sortable.wrap = this.wrap
.select('.table-top')
.append('div')
Expand Down Expand Up @@ -3970,8 +3971,8 @@
if (next >= this.config.nPages) next = this.config.nPages - 1; // nothing after the last page

/**-------------------------------------------------------------------------------------------\
Left side
\-------------------------------------------------------------------------------------------**/
Left side
\-------------------------------------------------------------------------------------------**/

this.pagination.wrap
.insert('span', ':first-child')
Expand All @@ -3998,8 +3999,8 @@
.text('<<');

/**-------------------------------------------------------------------------------------------\
Right side
\-------------------------------------------------------------------------------------------**/
Right side
\-------------------------------------------------------------------------------------------**/

this.pagination.wrap
.append('span')
Expand Down Expand Up @@ -4353,8 +4354,8 @@
this.events.onDatatransform.call(this);

/**-------------------------------------------------------------------------------------------\
Code below associated with the former paradigm of a d3.nest() data array.
\-------------------------------------------------------------------------------------------**/
Code below associated with the former paradigm of a d3.nest() data array.
\-------------------------------------------------------------------------------------------**/

if (config.row_per) {
var rev_order = config.row_per.slice(0).reverse();
Expand Down