@fishawack/lab-d3
Advanced tools
Comparing version 4.1.0 to 4.1.1
{ | ||
"name": "@fishawack/lab-d3", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Abstract layer built on top of d3", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -84,4 +84,5 @@ "use strict"; | ||
chockData: false, | ||
threshhold: { | ||
bounds: [0.8, 0.6, 0], | ||
threshold: { | ||
bounds: [], | ||
// [0.5, 0.25] will check if normalized value is > 0.5 and then > than 0.25 else no class is applied. Can also pass functions: [val => val > 0.5, val => val > 0.25] | ||
ratio: true, | ||
@@ -88,0 +89,0 @@ // When false will compare results without normalizing value so bounds are expected to be exact numbers |
@@ -319,6 +319,6 @@ "use strict"; | ||
select.classed('labD3__missing', !datum); | ||
att.threshhold.instant && Shared.applyThreshholds(value, select, att, datum); | ||
att.threshold.instant && Shared.applyThresholds(value, select, att, datum); | ||
return function (t) { | ||
var value = parseFloat(i(t)); | ||
att.threshhold.instant || Shared.applyThreshholds(value, select, att, datum); | ||
att.threshold.instant || Shared.applyThresholds(value, select, att, datum); | ||
local.dataLast.set(node, value); | ||
@@ -325,0 +325,0 @@ node[att.value.html ? 'innerHTML' : 'textContent'] = Shared.valueFormat(value, _objectSpread(_objectSpread({}, d), datum?.properties), att); |
@@ -33,6 +33,6 @@ "use strict"; | ||
var i = d3.interpolate(prev, value); | ||
att.threshhold.instant && Shared.applyThreshholds(value, select, att, d); | ||
att.threshold.instant && Shared.applyThresholds(value, select, att, d); | ||
return function (t) { | ||
var value = parseFloat(i(t)); | ||
att.threshhold.instant || Shared.applyThreshholds(value, select, att, d); | ||
att.threshold.instant || Shared.applyThresholds(value, select, att, d); | ||
local.dataLast.set(node, value); | ||
@@ -39,0 +39,0 @@ node[att.value.html ? 'innerHTML' : 'textContent'] = Shared.valueFormat(value, data[0], att); |
@@ -50,6 +50,6 @@ "use strict"; | ||
var i = d3.interpolate(prev, value); | ||
att.threshhold.instant && Shared.applyThreshholds(value, select, att, d); | ||
att.threshold.instant && Shared.applyThresholds(value, select, att, d); | ||
return function (t) { | ||
var value = parseFloat(i(t)); | ||
att.threshhold.instant || Shared.applyThreshholds(value, select, att, d); | ||
att.threshold.instant || Shared.applyThresholds(value, select, att, d); | ||
local.dataLast.set(node, value); | ||
@@ -56,0 +56,0 @@ }; |
@@ -341,6 +341,6 @@ "use strict"; | ||
}, | ||
applyThreshholds: function applyThreshholds(value, node, att, d) { | ||
var _att$threshhold = att.threshhold, | ||
ratio = _att$threshhold.ratio, | ||
bounds = _att$threshhold.bounds, | ||
applyThresholds: function applyThresholds(value, node, att, d) { | ||
var _att$threshold = att.threshold, | ||
ratio = _att$threshold.ratio, | ||
bounds = _att$threshold.bounds, | ||
totalCount = att.totalCount; | ||
@@ -347,0 +347,0 @@ var normal = value / (ratio ? totalCount : 1); |
560601
5567