Socket
Socket
Sign inDemoInstall

d3fc-series

Package Overview
Dependencies
14
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.0 to 3.2.1

62

build/d3fc-series.js

@@ -88,5 +88,5 @@ (function (global, factory) {

if (orient === 'vertical') {
var y = base.yScale(mainValue(d, i), i);
var y0 = base.yScale(baseValue(d, i), i);
var x = base.xScale(crossValue(d, i), i) + offset;
var y = base.yScale()(mainValue(d, i), i);
var y0 = base.yScale()(baseValue(d, i), i);
var x = base.xScale()(crossValue(d, i), i) + offset;
return {

@@ -105,5 +105,5 @@ d: d,

} else {
var _y = base.xScale(mainValue(d, i), i);
var _y2 = base.xScale(baseValue(d, i), i);
var _x = base.yScale(crossValue(d, i), i) + offset;
var _y = base.xScale()(mainValue(d, i), i);
var _y2 = base.xScale()(baseValue(d, i), i);
var _x = base.yScale()(crossValue(d, i), i) + offset;
return {

@@ -486,14 +486,14 @@ d: d,

if (orient === 'vertical') {
var y = base.yScale(highValue(d, i));
var y = base.yScale()(highValue(d, i));
return {
origin: [base.xScale(crossValue(d, i)) + offset, y],
origin: [base.xScale()(crossValue(d, i)) + offset, y],
high: 0,
low: base.yScale(lowValue(d, i)) - y,
low: base.yScale()(lowValue(d, i)) - y,
width: width
};
} else {
var x = base.xScale(lowValue(d, i));
var x = base.xScale()(lowValue(d, i));
return {
origin: [x, base.yScale(crossValue(d, i)) + offset],
high: base.xScale(highValue(d, i)) - x,
origin: [x, base.yScale()(crossValue(d, i)) + offset],
high: base.xScale()(highValue(d, i)) - x,
low: 0,

@@ -755,3 +755,3 @@ width: width

var crossValueScaled = function crossValueScaled(d, i) {
return base.xScale(crossValue(d, i));
return base.xScale()(crossValue(d, i));
};

@@ -783,6 +783,6 @@

cross: crossValueScaled(d, i) + offset,
open: base.yScale(openRaw),
high: base.yScale(highValue(d, i)),
low: base.yScale(lowValue(d, i)),
close: base.yScale(closeRaw),
open: base.yScale()(openRaw),
high: base.yScale()(highValue(d, i)),
low: base.yScale()(lowValue(d, i)),
close: base.yScale()(closeRaw),
width: width,

@@ -998,20 +998,20 @@ direction: direction

if (orient === 'vertical') {
var y = base.yScale(highValue(d, i));
var y = base.yScale()(highValue(d, i));
return {
origin: [base.xScale(crossValue(d, i)) + offset, y],
origin: [base.xScale()(crossValue(d, i)) + offset, y],
high: 0,
upperQuartile: base.yScale(upperQuartileValue(d, i)) - y,
median: base.yScale(medianValue(d, i)) - y,
lowerQuartile: base.yScale(lowerQuartileValue(d, i)) - y,
low: base.yScale(lowValue(d, i)) - y,
upperQuartile: base.yScale()(upperQuartileValue(d, i)) - y,
median: base.yScale()(medianValue(d, i)) - y,
lowerQuartile: base.yScale()(lowerQuartileValue(d, i)) - y,
low: base.yScale()(lowValue(d, i)) - y,
width: width
};
} else {
var x = base.xScale(lowValue(d, i));
var x = base.xScale()(lowValue(d, i));
return {
origin: [x, base.yScale(crossValue(d, i)) + offset],
high: base.xScale(highValue(d, i)) - x,
upperQuartile: base.xScale(upperQuartileValue(d, i)) - x,
median: base.xScale(medianValue(d, i)) - x,
lowerQuartile: base.xScale(lowerQuartileValue(d, i)) - x,
origin: [x, base.yScale()(crossValue(d, i)) + offset],
high: base.xScale()(highValue(d, i)) - x,
upperQuartile: base.xScale()(upperQuartileValue(d, i)) - x,
median: base.xScale()(medianValue(d, i)) - x,
lowerQuartile: base.xScale()(lowerQuartileValue(d, i)) - x,
low: 0,

@@ -1760,4 +1760,4 @@ width: width

return {
x: heatmap.xScale(xValue(d, i)),
y: heatmap.yScale(yValue(d, i)),
x: heatmap.xScale()(xValue(d, i)),
y: heatmap.yScale()(yValue(d, i)),
colorValue: colorValue(d, i),

@@ -1764,0 +1764,0 @@ width: xBandwidth(d, i),

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3fc-data-join"),require("d3-shape"),require("d3-selection"),require("d3fc-rebind"),require("d3-scale"),require("d3fc-shape"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3fc-data-join","d3-shape","d3-selection","d3fc-rebind","d3-scale","d3fc-shape","d3-array"],n):n(e.fc=e.fc||{},e.fc,e.d3,e.d3,e.fc,e.d3,e.fc,e.d3)}(this,function(e,n,t,r,i,a,o,l){"use strict";function c(){var e=arguments;return function(n,t){for(var r=0,i=e.length;r<i;r++)if(null==e[r](n,t))return!1;return!0}}var u=function(e){return"function"==typeof e?e:function(){return e}},d=function(e,n){switch(e){case"left":return n/2;case"right":return-n/2;default:return 0}},f=function(e){var n=Object.assign({},e),t=function(){};return Object.keys(n).forEach(function(e){t[e]=function(){return arguments.length?(n[e]=arguments.length<=0?void 0:arguments[0],t):n[e]}}),t},s=function(){var e=function(){return 0},n=function(e){return e.x},t=function(e){return e.y},r="center",i=function(){return 5},o="vertical",l=f({decorate:function(){},defined:function(r,i){return c(e,n,t)(r,i)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return l.values=function(a,c){var u=i(a,c),f=d(r,u);if("vertical"===o){var s=l.yScale(t(a,c),c),h=l.yScale(e(a,c),c),g=l.xScale(n(a,c),c)+f;return{d:a,x:g,y:s,y0:h,width:u,height:s-h,origin:[g,s],baseOrigin:[g,h],transposedX:g,transposedY:s}}var v=l.xScale(t(a,c),c),p=l.xScale(e(a,c),c),y=l.yScale(n(a,c),c)+f;return{d:a,x:y,y:v,y0:p,width:u,height:v-p,origin:[v,y],baseOrigin:[p,y],transposedX:v,transposedY:y}},l.baseValue=function(){return arguments.length?(e=u(arguments.length<=0?void 0:arguments[0]),l):e},l.crossValue=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),l):n},l.mainValue=function(){return arguments.length?(t=u(arguments.length<=0?void 0:arguments[0]),l):t},l.bandwidth=function(){return arguments.length?(i=u(arguments.length<=0?void 0:arguments[0]),l):i},l.align=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],l):r},l.orient=function(){return arguments.length?(o=arguments.length<=0?void 0:arguments[0],l):o},l},h={red:"#c60",green:"#6c0",black:"#000",gray:"#ddd",darkGray:"#999"},g=function(){var e=s(),a=t.line().defined(e.defined).x(function(n,t){return e.values(n,t).transposedX}).y(function(n,t){return e.values(n,t).transposedY}),o=n.dataJoin("path","line"),l=function(n){n.selection&&o.transition(n),n.each(function(n,t,i){var l=o(r.select(i[t]),[n]);l.enter().attr("fill","none").attr("stroke",h.black),l.attr("d",a),e.decorate()(l,n,t)})};return i.rebindAll(l,e,i.exclude("baseValue","bandwidth","align")),i.rebind(l,o,"key"),i.rebind(l,a,"curve"),l},v=function(){var e=s(),n=t.line().defined(e.defined).x(function(n,t){return e.values(n,t).transposedX}).y(function(n,t){return e.values(n,t).transposedY}),r=function(t){var r=n.context();r.beginPath(),n(t),r.strokeStyle=h.black,e.decorate()(r,t),r.stroke(),r.closePath()};return i.rebindAll(r,e,i.exclude("baseValue","bandwidth","align")),i.rebind(r,n,"curve","context"),r},p=function(){var e=t.symbol(),a=s(),o=n.dataJoin("g","point"),l=function(e){return"translate("+e[0]+", "+e[1]+")"},c=function(n){n.selection&&o.transition(n),n.each(function(n,t,i){var c=n.filter(a.defined),u=o(r.select(i[t]),c);u.enter().attr("transform",function(e,n){return l(a.values(e,n).origin)}).attr("fill",h.gray).attr("stroke",h.black).append("path"),u.attr("transform",function(e,n){return l(a.values(e,n).origin)}).select("path").attr("d",e),a.decorate()(u,n,t)})};return i.rebindAll(c,a,i.exclude("baseValue","bandwidth","align")),i.rebind(c,o,"key"),i.rebind(c,e,"type","size"),c},y=function(){var e=t.symbol(),n=s(),r=function(t){var r=t.filter(n.defined),i=e.context();r.forEach(function(r,a){i.save();var o=n.values(r,a);i.translate(o.origin[0],o.origin[1]),i.beginPath(),e(t),i.strokeStyle=h.black,i.fillStyle=h.gray,n.decorate()(i,r,a),i.stroke(),i.fill(),i.closePath(),i.restore()})};return i.rebindAll(r,n,i.exclude("baseValue","bandwidth","align")),i.rebind(r,e,"size","type","context"),r},b=function(){var e=o.shapeBar().x(0).y(0),t=s(),a=n.dataJoin("g","bar"),l=function(e){return"vertical"===t.orient()?e.height:e.width},c=function(e){return"vertical"===t.orient()?e.width:e.height},u=function(e){return"translate("+e[0]+", "+e[1]+")"},d=function(n){n.selection&&a.transition(n),n.each(function(n,i,o){var d=t.orient();if("vertical"!==d&&"horizontal"!==d)throw new Error("The bar series does not support an orientation of "+d);var f=n.filter(t.defined),s=f.map(t.values);e.width(0).height(0),"vertical"===t.orient()?(e.verticalAlign("top"),e.horizontalAlign("center")):(e.horizontalAlign("right"),e.verticalAlign("center"));var g=a(r.select(o[i]),f);g.enter().attr("transform",function(e,n){return u(s[n].baseOrigin)}).attr("class","bar "+t.orient()).attr("fill",h.darkGray).append("path").attr("d",function(n,t){return c(e)(s[t].width),e([n])}),g.attr("transform",function(e,n){return u(s[n].origin)}).select("path").attr("d",function(n,t){return c(e)(s[t].width),l(e)(-s[t].height),e([n])}),t.decorate()(g,f,i)})};return i.rebindAll(d,t),i.rebind(d,a,"key"),d},x=function(){var e=s(),n=o.shapeBar().x(0).y(0),t=function(n){return"vertical"===e.orient()?n.height:n.width},r=function(n){return"vertical"===e.orient()?n.width:n.height},a=function(i){var a=n.context(),o=i.filter(e.defined),l=o.map(e.values);"vertical"===e.orient()?(n.verticalAlign("top"),n.horizontalAlign("center")):(n.horizontalAlign("right"),n.verticalAlign("center")),l.forEach(function(i,o){a.save(),a.beginPath(),a.translate(i.origin[0],i.origin[1]),t(n)(-i.height),r(n)(i.width),n([i]),a.fillStyle=h.darkGray,e.decorate()(a,i.d,o),a.fill(),a.closePath(),a.restore()})};return i.rebindAll(a,e),i.rebind(a,n,"context"),a},w=function(){var e=function(e){return e.high},n=function(e){return e.low},t=function(e){return e.cross},r="vertical",i="center",o=function(){return 5},l=f({decorate:function(){},defined:function(r,i){return c(n,e,t)(r,i)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return l.values=function(a,c){var u=o(a,c),f=d(i,u);if("vertical"===r){var s=l.yScale(e(a,c));return{origin:[l.xScale(t(a,c))+f,s],high:0,low:l.yScale(n(a,c))-s,width:u}}var h=l.xScale(n(a,c));return{origin:[h,l.yScale(t(a,c))+f],high:l.xScale(e(a,c))-h,low:0,width:u}},l.orient=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],l):r},l.lowValue=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),l):n},l.highValue=function(){return arguments.length?(e=u(arguments.length<=0?void 0:arguments[0]),l):e},l.crossValue=function(){return arguments.length?(t=u(arguments.length<=0?void 0:arguments[0]),l):t},l.bandwidth=function(){return arguments.length?(o=u(arguments.length<=0?void 0:arguments[0]),l):o},l.align=function(){return arguments.length?(i=arguments.length<=0?void 0:arguments[0],l):i},l},S=function(){var e=w(),t=n.dataJoin("g","error-bar"),a=o.shapeErrorBar().value(0),l=function(e){return function(n){return e.selection?n.transition(e):n}},c=function(e){return"translate("+e.origin[0]+", "+e.origin[1]+")"},u=function(n){n.selection&&t.transition(n);var i=l(n);n.each(function(n,o,l){var u=n.filter(e.defined),d=u.map(e.values),f=t(r.select(l[o]),u);f.enter().attr("stroke",h.black).attr("fill",h.gray).attr("transform",function(n,t){return c(e.values(n,t))+" scale(1e-6, 1)"}).append("path"),a.orient(e.orient()),f.each(function(e,n,t){var o=d[n];a.high(o.high).low(o.low).width(o.width),i(r.select(t[n])).attr("transform",c(o)+" scale(1)").select("path").attr("d",a([e]))}),e.decorate()(f,n,o)})};return i.rebindAll(u,e),i.rebind(u,t,"key"),u},m=function(){var e=w(),n=o.shapeErrorBar().value(0),t=function(t){var r=t.filter(e.defined),i=n.context();n.orient(e.orient()),r.forEach(function(t,r){i.save();var a=e.values(t,r);i.translate(a.origin[0],a.origin[1]),i.beginPath(),n.high(a.high).width(a.width).low(a.low)([t]),i.strokeStyle=h.black,i.fillStyle=h.gray,e.decorate()(i,t,r),i.stroke(),i.fill(),i.closePath(),i.restore()})};return i.rebindAll(t,e),i.rebind(t,n,"context"),t},A=function(){var e=s(),a=t.area().defined(e.defined),o=n.dataJoin("path","area"),l=function(n){n.selection&&o.transition(n),n.each(function(n,t,i){var l=n.map(e.values);a.x(function(e,n){return l[n].transposedX}).y(function(e,n){return l[n].transposedY});var c="vertical"===e.orient()?"y":"x";a[c+"0"](function(e,n){return l[n].y0}),a[c+"1"](function(e,n){return l[n].y});var u=o(r.select(i[t]),[n]);u.enter().attr("fill",h.gray),u.attr("d",a),e.decorate()(u,n,t)})};return i.rebindAll(l,e,i.exclude("bandwidth","align")),i.rebind(l,o,"key"),i.rebind(l,a,"curve"),l},k=function(){var e=s(),n=t.area().defined(e.defined),r=function(t){var r=n.context(),i=t.map(e.values);n.x(function(e,n){return i[n].transposedX}).y(function(e,n){return i[n].transposedY});var a="vertical"===e.orient()?"y":"x";n[a+"0"](function(e,n){return i[n].y0}),n[a+"1"](function(e,n){return i[n].y}),r.beginPath(),n(t),r.fillStyle=h.gray,e.decorate()(r,t),r.fill(),r.closePath()};return i.rebindAll(r,e,i.exclude("bandwidth","align")),i.rebind(r,n,"curve","context"),r},V=function(){var e=void 0,n=function(e){return e.date},t=function(e){return e.open},r=function(e){return e.high},i=function(e){return e.low},o=function(e){return e.close},l=function(){return 5},s="center",h=function(t,r){return e.xScale(n(t,r))};return e=f({decorate:function(){},defined:function(e,a){return c(n,t,i,r,o)(e,a)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()}),e.values=function(n,a){var c=o(n,a),u=t(n,a),f=l(n,a),g=d(s,f),v="";return c>u?v="up":c<u&&(v="down"),{cross:h(n,a)+g,open:e.yScale(u),high:e.yScale(r(n,a)),low:e.yScale(i(n,a)),close:e.yScale(c),width:f,direction:v}},e.crossValue=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],e):n},e.openValue=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],e):t},e.highValue=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],e):r},e.lowValue=function(){return arguments.length?(i=arguments.length<=0?void 0:arguments[0],e):i},e.yValue=e.closeValue=function(){return arguments.length?(o=arguments.length<=0?void 0:arguments[0],e):o},e.bandwidth=function(){return arguments.length?(l=u(arguments.length<=0?void 0:arguments[0]),e):l},e.align=function(){return arguments.length?(s=arguments.length<=0?void 0:arguments[0],e):s},e},P=function(e,t){var a=V(),o=n.dataJoin("g",t),l=function(e){return"translate("+e.cross+", "+e.high+")"},c=function(e){return function(n){return e.selection?n.transition(e):n}},u=function(n){n.selection&&o.transition(n);var i=c(n);n.each(function(n,c,u){var d=n.filter(a.defined),f=o(r.select(u[c]),d);f.enter().attr("transform",function(e,n){return l(a.values(e,n))+" scale(1e-6, 1)"}).append("path"),f.each(function(n,o,c){var u=a.values(n,o),d="up"===u.direction?h.green:h.red,f=i(r.select(c[o])).attr("class",t+" "+u.direction).attr("stroke",d).attr("fill",d).attr("transform",function(){return l(u)+" scale(1)"});e.x(0).width(u.width).open(function(){return u.open-u.high}).high(0).low(function(){return u.low-u.high}).close(function(){return u.close-u.high}),f.select("path").attr("d",e([n]))}),a.decorate()(f,n,c)})};return i.rebind(u,o,"key"),i.rebindAll(u,a),u},B=function(){return P(o.shapeCandlestick(),"candlestick")},C=function(e){var n=V(),t=function(t){var r=t.filter(n.defined),i=e.context();r.forEach(function(t,r){i.save();var a=n.values(t,r);i.translate(a.cross,a.high),i.beginPath(),e.x(0).open(function(){return a.open-a.high}).width(a.width).high(0).low(function(){return a.low-a.high}).close(function(){return a.close-a.high})([t]);var o="up"===a.direction?h.green:h.red;i.strokeStyle=o,i.fillStyle=o,n.decorate()(i,t,r),i.stroke(),i.fill(),i.closePath(),i.restore()})};return i.rebind(t,e,"context"),i.rebindAll(t,n),t},I=function(){return C(o.shapeCandlestick())},Q=function(){var e=function(e){return e.upperQuartile},n=function(e){return e.lowerQuartile},t=function(e){return e.high},r=function(e){return e.low},i=function(e){return e.value},o=function(e){return e.median},l="vertical",s="center",h=function(){return 5},g=f({decorate:function(){},defined:function(a,l){return c(r,t,n,e,i,o)(a,l)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return g.values=function(a,c){var u=h(a,c),f=d(s,u);if("vertical"===l){var v=g.yScale(t(a,c));return{origin:[g.xScale(i(a,c))+f,v],high:0,upperQuartile:g.yScale(e(a,c))-v,median:g.yScale(o(a,c))-v,lowerQuartile:g.yScale(n(a,c))-v,low:g.yScale(r(a,c))-v,width:u}}var p=g.xScale(r(a,c));return{origin:[p,g.yScale(i(a,c))+f],high:g.xScale(t(a,c))-p,upperQuartile:g.xScale(e(a,c))-p,median:g.xScale(o(a,c))-p,lowerQuartile:g.xScale(n(a,c))-p,low:0,width:u}},g.orient=function(){return arguments.length?(l=arguments.length<=0?void 0:arguments[0],g):l},g.lowerQuartileValue=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),g):n},g.upperQuartileValue=function(){return arguments.length?(e=u(arguments.length<=0?void 0:arguments[0]),g):e},g.lowValue=function(){return arguments.length?(r=u(arguments.length<=0?void 0:arguments[0]),g):r},g.highValue=function(){return arguments.length?(t=u(arguments.length<=0?void 0:arguments[0]),g):t},g.crossValue=function(){return arguments.length?(i=u(arguments.length<=0?void 0:arguments[0]),g):i},g.medianValue=function(){return arguments.length?(o=u(arguments.length<=0?void 0:arguments[0]),g):o},g.bandwidth=function(){return arguments.length?(h=u(arguments.length<=0?void 0:arguments[0]),g):h},g.align=function(){return arguments.length?(s=arguments.length<=0?void 0:arguments[0],g):s},g},E=function(){var e=Q(),t=n.dataJoin("g","box-plot"),a=o.shapeBoxPlot().value(0),l=function(e){return function(n){return e.selection?n.transition(e):n}},c=function(e){return"translate("+e.origin[0]+", "+e.origin[1]+")"},u=function(n){n.selection&&t.transition(n);var i=l(n);n.each(function(n,o,l){var u=n.filter(e.defined),d=t(r.select(l[o]),u);d.enter().attr("stroke",h.black).attr("fill",h.gray).attr("transform",function(n,t){return c(e.values(n,t))+" scale(1e-6, 1)"}).append("path"),a.orient(e.orient()),d.each(function(n,t,o){var l=e.values(n,t);a.median(l.median).upperQuartile(l.upperQuartile).lowerQuartile(l.lowerQuartile).width(l.width).high(l.high).low(l.low),i(r.select(o[t])).attr("transform",c(l)).select("path").attr("d",a([n]))}),e.decorate()(d,n,o)})};return i.rebindAll(u,e),i.rebind(u,t,"key"),i.rebind(u,a,"cap"),u},O=function(){var e=Q(),n=o.shapeBoxPlot().value(0),t=function(t){var r=t.filter(e.defined),i=n.context();n.orient(e.orient()),r.forEach(function(t,r){i.save();var a=e.values(t,r);i.translate(a.origin[0],a.origin[1]),i.beginPath(),n.median(a.median).upperQuartile(a.upperQuartile).lowerQuartile(a.lowerQuartile).high(a.high).width(a.width).low(a.low)([t]),i.strokeStyle=h.black,i.fillStyle=h.gray,e.decorate()(i,t,r),i.stroke(),i.fill(),i.closePath(),i.restore()})};return i.rebindAll(t,e),i.rebind(t,n,"cap","context"),t},G=function(){return P(o.shapeOhlc(),"ohlc")},J=function(){return C(o.shapeOhlc())},z=function(){var e=[],n=function(e){return e},t=function(e,n){return n},r=f({decorate:function(){},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return r.mapping=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],r):n},r.key=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],r):t},r.series=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],r):e},r},q=function(){var e=z(),t=n.dataJoin("g"),a=n.dataJoin("g","multi"),o=function(n){n.selection&&(a.transition(n),t.transition(n));var i=e.mapping(),o=e.series(),l=e.xScale(),c=e.yScale();n.each(function(n,u,d){var f=a(r.select(d[u]),o);f.each(function(e,a,u){e.xScale(l).yScale(c);var d=i(n,a,o);t(r.select(u[a]),[d]).call(e)}),(f.selection?f.selection():f).order(),e.decorate()(f,n,u)})};return i.rebindAll(o,e),i.rebind(o,a,"key"),o},F=function(){var e=null,n=z(),t=function(t){var r=n.mapping(),i=n.series(),a=n.xScale(),o=n.yScale();i.forEach(function(l,c){var u=r(t,c,i);l.context(e).xScale(a).yScale(o);var d=l.decorate();l.decorate(function(e,r,i){n.decorate()(e,t,c),d(e,r,i)}),l(u),l.decorate(d)})};return t.context=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],t):e},i.rebindAll(t,n),t},j=function(e){var n=function(){return 50},t="center",r=a.scaleBand(),o=f({decorate:function(){},xScale:a.scaleLinear()});return o.offsetScaleForDatum=function(e,i,a){var o=n(i,a),c=d(t,o),u=o/2;return r.domain(l.range(0,e.length)).range([-u+c,u+c])},o.bandwidth=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),o):n},o.align=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],o):t},i.rebindAll(o,r,i.includeMap({paddingInner:"paddingOuter"})),o},D=function(e){var t=j(),a=n.dataJoin("g","grouped"),o=function(n){n.selection&&a.transition(n),n.each(function(n,i,o){var l=a(r.select(o[i]),n);l.enter().append("g"),l.select("g").each(function(i,a,o){var l=r.select(o[a]),c=function(e,r){var i=t.offsetScaleForDatum(n,e,r);return t.xScale()(e)+i(a)+i.bandwidth()/2};e.xScale(c),e.bandwidth&&e.bandwidth(function(e,r){return t.offsetScaleForDatum(n,e,r).bandwidth()}),e.decorate(function(e,n){return t.decorate()(e,n,a)}),l.call(e)})})};return i.rebindAll(o,e,i.exclude("decorate","xScale")),i.rebindAll(o,t,i.exclude("offsetScaleForDatum")),o},M=function(e){var n=j(),t=function(t){t.forEach(function(r,i){var a=function(e,r){var a=n.offsetScaleForDatum(t,e,r);return n.xScale()(e)+a(i)+a.bandwidth()/2};e.xScale(a),e.bandwidth&&e.bandwidth(function(e,r){return n.offsetScaleForDatum(t,e,r).bandwidth()}),e.decorate(function(e,t){return n.decorate()(e,t,i)}),e(r)})};return i.rebindAll(t,e,i.exclude("decorate","xScale")),i.rebindAll(t,n,i.exclude("configureOffsetScale","configureOffset")),t},X=function(){var e="vertical",n=g(),t=q(),a=function(i){return i.each(function(i,a,o){"vertical"===e?t.series(i[0].map(function(e){return n})).mapping(function(e,n){return e.map(function(e){return e[n]})}):t.series(i.map(function(e){return n})).mapping(function(e,n){return e[n]}),r.select(o[a]).call(t)})};return a.series=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],a):n},a.orient=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],a):e},i.rebindAll(a,t,i.exclude("series","mapping")),a},Y=function(){var e="vertical",n=v(),t=F(),r=function(r){"vertical"===e?t.series(r[0].map(function(e){return n})).mapping(function(e,n){return e.map(function(e){return e[n]})}):t.series(r.map(function(e){return n})).mapping(function(e,n){return e[n]}),t(r)};return r.series=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],r):n},r.orient=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],r):e},i.rebindAll(r,t,i.exclude("series","mapping")),r},L=function(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)},H=function(e){return e.sort(l.ascending).filter(function(e,n,t){return-1===t.indexOf(e,n+1)})},R=function(e){var n=.75,t=function(e){if(e.length<=1)return 10;e=H(e);var t=l.pairs(e).map(function(e){return Math.abs(e[0]-e[1])}),r=l.min(t);return n*r},a=function(n,r,i){if(n.bandwidth)return n.bandwidth();var a,o=Array.isArray(r)?(a=[]).concat.apply(a,L(r)):r,l=o.filter(e.defined).map(i()).map(n);return t(l)},o=function(n){var t=function(n){if(e.xBandwidth&&e.yBandwidth)e.xBandwidth(a(e.xScale(),n,e.xValue)),e.yBandwidth(a(e.yScale(),n,e.yValue));else{var t=e.orient&&"horizontal"===e.orient()?e.yScale():e.xScale();e.bandwidth(a(t,n,e.crossValue))}};n instanceof r.selection?n.each(function(n,i,a){t(n),e(r.select(a[i]))}):(t(n),e(n))};return i.rebindAll(o,e),o.widthFraction=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],o):n},o},_=function(){var e=function(e){return e.x},n=function(e){return e.y},t=function(e){return e.color},r=function(){return 5},d=function(){return 5},s=a.interpolateViridis,h=f({decorate:function(){},defined:function(r,i){return c(e,n,t)(r,i)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return h.pathGenerator=o.shapeBar().x(0).y(0),h.colorScale=function(e){var n=e.map(t);return a.scaleLinear().domain([l.min(n),l.max(n)])},h.values=function(i,a){return{x:h.xScale(e(i,a)),y:h.yScale(n(i,a)),colorValue:t(i,a),width:d(i,a),height:r(i,a)}},h.xValue=function(){return arguments.length?(e=u(arguments.length<=0?void 0:arguments[0]),h):e},h.yValue=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),h):n},h.colorValue=function(){return arguments.length?(t=u(arguments.length<=0?void 0:arguments[0]),h):t},h.colorInterpolate=function(){return arguments.length?(s=arguments.length<=0?void 0:arguments[0],h):s},h.xBandwidth=function(){return arguments.length?(d=u(arguments.length<=0?void 0:arguments[0]),h):d},h.yBandwidth=function(){return arguments.length?(r=u(arguments.length<=0?void 0:arguments[0]),h):r},i.rebindAll(h,h.pathGenerator,i.includeMap({horizontalAlign:"xAlign",verticalAlign:"yAlign"})),h},T=function(){var e=_(),t=n.dataJoin("g","box"),a=function(e){return"translate("+e.x+", "+e.y+")"},o=function(n){n.each(function(n,i,o){var l=n.filter(e.defined),c=e.colorValue(),u=e.colorInterpolate(),d=e.colorScale(l),f=t(r.select(o[i]),l);f.enter().append("path").attr("stroke","transparent"),f.attr("transform",function(n,t){return a(e.values(n,t))}).select("path").attr("d",function(n,t){return e.pathGenerator.width(e.values(n,t).width).height(e.values(n,t).height)([n])}).attr("fill",function(e,n){return u(d(c(e,n)))}),e.decorate()(f,n,i)})};return i.rebindAll(o,e),o},K=function(){var e=_(),n=function(n){var t=n.filter(e.defined),r=(e.colorValue(),e.colorInterpolate()),i=e.colorScale(t),a=e.pathGenerator.context();t.forEach(function(n,t){a.save(),a.beginPath();var o=e.values(n,t);a.translate(o.x,o.y),a.fillStyle=r(i(o.colorValue)),e.pathGenerator.height(o.height).width(o.width)([n]),e.decorate()(a,n,t),a.fill(),a.closePath(),a.restore()})};return i.rebind(n,e.pathGenerator,"context"),i.rebindAll(n,e),n};e.seriesSvgLine=g,e.seriesCanvasLine=v,e.seriesSvgPoint=p,e.seriesCanvasPoint=y,e.seriesSvgBar=b,e.seriesCanvasBar=x,e.seriesSvgErrorBar=S,e.seriesCanvasErrorBar=m,e.seriesSvgArea=A,e.seriesCanvasArea=k,e.seriesSvgCandlestick=B,e.seriesCanvasCandlestick=I,e.seriesSvgBoxPlot=E,e.seriesCanvasBoxPlot=O,e.seriesSvgOhlc=G,e.seriesCanvasOhlc=J,e.seriesSvgMulti=q,e.seriesCanvasMulti=F,e.seriesSvgGrouped=D,e.seriesCanvasGrouped=M,e.seriesSvgRepeat=X,e.seriesCanvasRepeat=Y,e.autoBandwidth=R,e.seriesSvgHeatmap=T,e.seriesCanvasHeatmap=K,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3fc-data-join"),require("d3-shape"),require("d3-selection"),require("d3fc-rebind"),require("d3-scale"),require("d3fc-shape"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3fc-data-join","d3-shape","d3-selection","d3fc-rebind","d3-scale","d3fc-shape","d3-array"],n):n(e.fc=e.fc||{},e.fc,e.d3,e.d3,e.fc,e.d3,e.fc,e.d3)}(this,function(e,n,t,r,i,a,o,l){"use strict";function c(){var e=arguments;return function(n,t){for(var r=0,i=e.length;r<i;r++)if(null==e[r](n,t))return!1;return!0}}var u=function(e){return"function"==typeof e?e:function(){return e}},d=function(e,n){switch(e){case"left":return n/2;case"right":return-n/2;default:return 0}},f=function(e){var n=Object.assign({},e),t=function(){};return Object.keys(n).forEach(function(e){t[e]=function(){return arguments.length?(n[e]=arguments.length<=0?void 0:arguments[0],t):n[e]}}),t},s=function(){var e=function(){return 0},n=function(e){return e.x},t=function(e){return e.y},r="center",i=function(){return 5},o="vertical",l=f({decorate:function(){},defined:function(r,i){return c(e,n,t)(r,i)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return l.values=function(a,c){var u=i(a,c),f=d(r,u);if("vertical"===o){var s=l.yScale()(t(a,c),c),h=l.yScale()(e(a,c),c),g=l.xScale()(n(a,c),c)+f;return{d:a,x:g,y:s,y0:h,width:u,height:s-h,origin:[g,s],baseOrigin:[g,h],transposedX:g,transposedY:s}}var v=l.xScale()(t(a,c),c),p=l.xScale()(e(a,c),c),y=l.yScale()(n(a,c),c)+f;return{d:a,x:y,y:v,y0:p,width:u,height:v-p,origin:[v,y],baseOrigin:[p,y],transposedX:v,transposedY:y}},l.baseValue=function(){return arguments.length?(e=u(arguments.length<=0?void 0:arguments[0]),l):e},l.crossValue=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),l):n},l.mainValue=function(){return arguments.length?(t=u(arguments.length<=0?void 0:arguments[0]),l):t},l.bandwidth=function(){return arguments.length?(i=u(arguments.length<=0?void 0:arguments[0]),l):i},l.align=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],l):r},l.orient=function(){return arguments.length?(o=arguments.length<=0?void 0:arguments[0],l):o},l},h={red:"#c60",green:"#6c0",black:"#000",gray:"#ddd",darkGray:"#999"},g=function(){var e=s(),a=t.line().defined(e.defined).x(function(n,t){return e.values(n,t).transposedX}).y(function(n,t){return e.values(n,t).transposedY}),o=n.dataJoin("path","line"),l=function(n){n.selection&&o.transition(n),n.each(function(n,t,i){var l=o(r.select(i[t]),[n]);l.enter().attr("fill","none").attr("stroke",h.black),l.attr("d",a),e.decorate()(l,n,t)})};return i.rebindAll(l,e,i.exclude("baseValue","bandwidth","align")),i.rebind(l,o,"key"),i.rebind(l,a,"curve"),l},v=function(){var e=s(),n=t.line().defined(e.defined).x(function(n,t){return e.values(n,t).transposedX}).y(function(n,t){return e.values(n,t).transposedY}),r=function(t){var r=n.context();r.beginPath(),n(t),r.strokeStyle=h.black,e.decorate()(r,t),r.stroke(),r.closePath()};return i.rebindAll(r,e,i.exclude("baseValue","bandwidth","align")),i.rebind(r,n,"curve","context"),r},p=function(){var e=t.symbol(),a=s(),o=n.dataJoin("g","point"),l=function(e){return"translate("+e[0]+", "+e[1]+")"},c=function(n){n.selection&&o.transition(n),n.each(function(n,t,i){var c=n.filter(a.defined),u=o(r.select(i[t]),c);u.enter().attr("transform",function(e,n){return l(a.values(e,n).origin)}).attr("fill",h.gray).attr("stroke",h.black).append("path"),u.attr("transform",function(e,n){return l(a.values(e,n).origin)}).select("path").attr("d",e),a.decorate()(u,n,t)})};return i.rebindAll(c,a,i.exclude("baseValue","bandwidth","align")),i.rebind(c,o,"key"),i.rebind(c,e,"type","size"),c},y=function(){var e=t.symbol(),n=s(),r=function(t){var r=t.filter(n.defined),i=e.context();r.forEach(function(r,a){i.save();var o=n.values(r,a);i.translate(o.origin[0],o.origin[1]),i.beginPath(),e(t),i.strokeStyle=h.black,i.fillStyle=h.gray,n.decorate()(i,r,a),i.stroke(),i.fill(),i.closePath(),i.restore()})};return i.rebindAll(r,n,i.exclude("baseValue","bandwidth","align")),i.rebind(r,e,"size","type","context"),r},b=function(){var e=o.shapeBar().x(0).y(0),t=s(),a=n.dataJoin("g","bar"),l=function(e){return"vertical"===t.orient()?e.height:e.width},c=function(e){return"vertical"===t.orient()?e.width:e.height},u=function(e){return"translate("+e[0]+", "+e[1]+")"},d=function(n){n.selection&&a.transition(n),n.each(function(n,i,o){var d=t.orient();if("vertical"!==d&&"horizontal"!==d)throw new Error("The bar series does not support an orientation of "+d);var f=n.filter(t.defined),s=f.map(t.values);e.width(0).height(0),"vertical"===t.orient()?(e.verticalAlign("top"),e.horizontalAlign("center")):(e.horizontalAlign("right"),e.verticalAlign("center"));var g=a(r.select(o[i]),f);g.enter().attr("transform",function(e,n){return u(s[n].baseOrigin)}).attr("class","bar "+t.orient()).attr("fill",h.darkGray).append("path").attr("d",function(n,t){return c(e)(s[t].width),e([n])}),g.attr("transform",function(e,n){return u(s[n].origin)}).select("path").attr("d",function(n,t){return c(e)(s[t].width),l(e)(-s[t].height),e([n])}),t.decorate()(g,f,i)})};return i.rebindAll(d,t),i.rebind(d,a,"key"),d},x=function(){var e=s(),n=o.shapeBar().x(0).y(0),t=function(n){return"vertical"===e.orient()?n.height:n.width},r=function(n){return"vertical"===e.orient()?n.width:n.height},a=function(i){var a=n.context(),o=i.filter(e.defined),l=o.map(e.values);"vertical"===e.orient()?(n.verticalAlign("top"),n.horizontalAlign("center")):(n.horizontalAlign("right"),n.verticalAlign("center")),l.forEach(function(i,o){a.save(),a.beginPath(),a.translate(i.origin[0],i.origin[1]),t(n)(-i.height),r(n)(i.width),n([i]),a.fillStyle=h.darkGray,e.decorate()(a,i.d,o),a.fill(),a.closePath(),a.restore()})};return i.rebindAll(a,e),i.rebind(a,n,"context"),a},w=function(){var e=function(e){return e.high},n=function(e){return e.low},t=function(e){return e.cross},r="vertical",i="center",o=function(){return 5},l=f({decorate:function(){},defined:function(r,i){return c(n,e,t)(r,i)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return l.values=function(a,c){var u=o(a,c),f=d(i,u);if("vertical"===r){var s=l.yScale()(e(a,c));return{origin:[l.xScale()(t(a,c))+f,s],high:0,low:l.yScale()(n(a,c))-s,width:u}}var h=l.xScale()(n(a,c));return{origin:[h,l.yScale()(t(a,c))+f],high:l.xScale()(e(a,c))-h,low:0,width:u}},l.orient=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],l):r},l.lowValue=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),l):n},l.highValue=function(){return arguments.length?(e=u(arguments.length<=0?void 0:arguments[0]),l):e},l.crossValue=function(){return arguments.length?(t=u(arguments.length<=0?void 0:arguments[0]),l):t},l.bandwidth=function(){return arguments.length?(o=u(arguments.length<=0?void 0:arguments[0]),l):o},l.align=function(){return arguments.length?(i=arguments.length<=0?void 0:arguments[0],l):i},l},S=function(){var e=w(),t=n.dataJoin("g","error-bar"),a=o.shapeErrorBar().value(0),l=function(e){return function(n){return e.selection?n.transition(e):n}},c=function(e){return"translate("+e.origin[0]+", "+e.origin[1]+")"},u=function(n){n.selection&&t.transition(n);var i=l(n);n.each(function(n,o,l){var u=n.filter(e.defined),d=u.map(e.values),f=t(r.select(l[o]),u);f.enter().attr("stroke",h.black).attr("fill",h.gray).attr("transform",function(n,t){return c(e.values(n,t))+" scale(1e-6, 1)"}).append("path"),a.orient(e.orient()),f.each(function(e,n,t){var o=d[n];a.high(o.high).low(o.low).width(o.width),i(r.select(t[n])).attr("transform",c(o)+" scale(1)").select("path").attr("d",a([e]))}),e.decorate()(f,n,o)})};return i.rebindAll(u,e),i.rebind(u,t,"key"),u},m=function(){var e=w(),n=o.shapeErrorBar().value(0),t=function(t){var r=t.filter(e.defined),i=n.context();n.orient(e.orient()),r.forEach(function(t,r){i.save();var a=e.values(t,r);i.translate(a.origin[0],a.origin[1]),i.beginPath(),n.high(a.high).width(a.width).low(a.low)([t]),i.strokeStyle=h.black,i.fillStyle=h.gray,e.decorate()(i,t,r),i.stroke(),i.fill(),i.closePath(),i.restore()})};return i.rebindAll(t,e),i.rebind(t,n,"context"),t},A=function(){var e=s(),a=t.area().defined(e.defined),o=n.dataJoin("path","area"),l=function(n){n.selection&&o.transition(n),n.each(function(n,t,i){var l=n.map(e.values);a.x(function(e,n){return l[n].transposedX}).y(function(e,n){return l[n].transposedY});var c="vertical"===e.orient()?"y":"x";a[c+"0"](function(e,n){return l[n].y0}),a[c+"1"](function(e,n){return l[n].y});var u=o(r.select(i[t]),[n]);u.enter().attr("fill",h.gray),u.attr("d",a),e.decorate()(u,n,t)})};return i.rebindAll(l,e,i.exclude("bandwidth","align")),i.rebind(l,o,"key"),i.rebind(l,a,"curve"),l},k=function(){var e=s(),n=t.area().defined(e.defined),r=function(t){var r=n.context(),i=t.map(e.values);n.x(function(e,n){return i[n].transposedX}).y(function(e,n){return i[n].transposedY});var a="vertical"===e.orient()?"y":"x";n[a+"0"](function(e,n){return i[n].y0}),n[a+"1"](function(e,n){return i[n].y}),r.beginPath(),n(t),r.fillStyle=h.gray,e.decorate()(r,t),r.fill(),r.closePath()};return i.rebindAll(r,e,i.exclude("bandwidth","align")),i.rebind(r,n,"curve","context"),r},V=function(){var e=void 0,n=function(e){return e.date},t=function(e){return e.open},r=function(e){return e.high},i=function(e){return e.low},o=function(e){return e.close},l=function(){return 5},s="center",h=function(t,r){return e.xScale()(n(t,r))};return e=f({decorate:function(){},defined:function(e,a){return c(n,t,i,r,o)(e,a)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()}),e.values=function(n,a){var c=o(n,a),u=t(n,a),f=l(n,a),g=d(s,f),v="";return c>u?v="up":c<u&&(v="down"),{cross:h(n,a)+g,open:e.yScale()(u),high:e.yScale()(r(n,a)),low:e.yScale()(i(n,a)),close:e.yScale()(c),width:f,direction:v}},e.crossValue=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],e):n},e.openValue=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],e):t},e.highValue=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],e):r},e.lowValue=function(){return arguments.length?(i=arguments.length<=0?void 0:arguments[0],e):i},e.yValue=e.closeValue=function(){return arguments.length?(o=arguments.length<=0?void 0:arguments[0],e):o},e.bandwidth=function(){return arguments.length?(l=u(arguments.length<=0?void 0:arguments[0]),e):l},e.align=function(){return arguments.length?(s=arguments.length<=0?void 0:arguments[0],e):s},e},P=function(e,t){var a=V(),o=n.dataJoin("g",t),l=function(e){return"translate("+e.cross+", "+e.high+")"},c=function(e){return function(n){return e.selection?n.transition(e):n}},u=function(n){n.selection&&o.transition(n);var i=c(n);n.each(function(n,c,u){var d=n.filter(a.defined),f=o(r.select(u[c]),d);f.enter().attr("transform",function(e,n){return l(a.values(e,n))+" scale(1e-6, 1)"}).append("path"),f.each(function(n,o,c){var u=a.values(n,o),d="up"===u.direction?h.green:h.red,f=i(r.select(c[o])).attr("class",t+" "+u.direction).attr("stroke",d).attr("fill",d).attr("transform",function(){return l(u)+" scale(1)"});e.x(0).width(u.width).open(function(){return u.open-u.high}).high(0).low(function(){return u.low-u.high}).close(function(){return u.close-u.high}),f.select("path").attr("d",e([n]))}),a.decorate()(f,n,c)})};return i.rebind(u,o,"key"),i.rebindAll(u,a),u},B=function(){return P(o.shapeCandlestick(),"candlestick")},C=function(e){var n=V(),t=function(t){var r=t.filter(n.defined),i=e.context();r.forEach(function(t,r){i.save();var a=n.values(t,r);i.translate(a.cross,a.high),i.beginPath(),e.x(0).open(function(){return a.open-a.high}).width(a.width).high(0).low(function(){return a.low-a.high}).close(function(){return a.close-a.high})([t]);var o="up"===a.direction?h.green:h.red;i.strokeStyle=o,i.fillStyle=o,n.decorate()(i,t,r),i.stroke(),i.fill(),i.closePath(),i.restore()})};return i.rebind(t,e,"context"),i.rebindAll(t,n),t},I=function(){return C(o.shapeCandlestick())},Q=function(){var e=function(e){return e.upperQuartile},n=function(e){return e.lowerQuartile},t=function(e){return e.high},r=function(e){return e.low},i=function(e){return e.value},o=function(e){return e.median},l="vertical",s="center",h=function(){return 5},g=f({decorate:function(){},defined:function(a,l){return c(r,t,n,e,i,o)(a,l)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return g.values=function(a,c){var u=h(a,c),f=d(s,u);if("vertical"===l){var v=g.yScale()(t(a,c));return{origin:[g.xScale()(i(a,c))+f,v],high:0,upperQuartile:g.yScale()(e(a,c))-v,median:g.yScale()(o(a,c))-v,lowerQuartile:g.yScale()(n(a,c))-v,low:g.yScale()(r(a,c))-v,width:u}}var p=g.xScale()(r(a,c));return{origin:[p,g.yScale()(i(a,c))+f],high:g.xScale()(t(a,c))-p,upperQuartile:g.xScale()(e(a,c))-p,median:g.xScale()(o(a,c))-p,lowerQuartile:g.xScale()(n(a,c))-p,low:0,width:u}},g.orient=function(){return arguments.length?(l=arguments.length<=0?void 0:arguments[0],g):l},g.lowerQuartileValue=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),g):n},g.upperQuartileValue=function(){return arguments.length?(e=u(arguments.length<=0?void 0:arguments[0]),g):e},g.lowValue=function(){return arguments.length?(r=u(arguments.length<=0?void 0:arguments[0]),g):r},g.highValue=function(){return arguments.length?(t=u(arguments.length<=0?void 0:arguments[0]),g):t},g.crossValue=function(){return arguments.length?(i=u(arguments.length<=0?void 0:arguments[0]),g):i},g.medianValue=function(){return arguments.length?(o=u(arguments.length<=0?void 0:arguments[0]),g):o},g.bandwidth=function(){return arguments.length?(h=u(arguments.length<=0?void 0:arguments[0]),g):h},g.align=function(){return arguments.length?(s=arguments.length<=0?void 0:arguments[0],g):s},g},E=function(){var e=Q(),t=n.dataJoin("g","box-plot"),a=o.shapeBoxPlot().value(0),l=function(e){return function(n){return e.selection?n.transition(e):n}},c=function(e){return"translate("+e.origin[0]+", "+e.origin[1]+")"},u=function(n){n.selection&&t.transition(n);var i=l(n);n.each(function(n,o,l){var u=n.filter(e.defined),d=t(r.select(l[o]),u);d.enter().attr("stroke",h.black).attr("fill",h.gray).attr("transform",function(n,t){return c(e.values(n,t))+" scale(1e-6, 1)"}).append("path"),a.orient(e.orient()),d.each(function(n,t,o){var l=e.values(n,t);a.median(l.median).upperQuartile(l.upperQuartile).lowerQuartile(l.lowerQuartile).width(l.width).high(l.high).low(l.low),i(r.select(o[t])).attr("transform",c(l)).select("path").attr("d",a([n]))}),e.decorate()(d,n,o)})};return i.rebindAll(u,e),i.rebind(u,t,"key"),i.rebind(u,a,"cap"),u},O=function(){var e=Q(),n=o.shapeBoxPlot().value(0),t=function(t){var r=t.filter(e.defined),i=n.context();n.orient(e.orient()),r.forEach(function(t,r){i.save();var a=e.values(t,r);i.translate(a.origin[0],a.origin[1]),i.beginPath(),n.median(a.median).upperQuartile(a.upperQuartile).lowerQuartile(a.lowerQuartile).high(a.high).width(a.width).low(a.low)([t]),i.strokeStyle=h.black,i.fillStyle=h.gray,e.decorate()(i,t,r),i.stroke(),i.fill(),i.closePath(),i.restore()})};return i.rebindAll(t,e),i.rebind(t,n,"cap","context"),t},G=function(){return P(o.shapeOhlc(),"ohlc")},J=function(){return C(o.shapeOhlc())},z=function(){var e=[],n=function(e){return e},t=function(e,n){return n},r=f({decorate:function(){},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return r.mapping=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],r):n},r.key=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],r):t},r.series=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],r):e},r},q=function(){var e=z(),t=n.dataJoin("g"),a=n.dataJoin("g","multi"),o=function(n){n.selection&&(a.transition(n),t.transition(n));var i=e.mapping(),o=e.series(),l=e.xScale(),c=e.yScale();n.each(function(n,u,d){var f=a(r.select(d[u]),o);f.each(function(e,a,u){e.xScale(l).yScale(c);var d=i(n,a,o);t(r.select(u[a]),[d]).call(e)}),(f.selection?f.selection():f).order(),e.decorate()(f,n,u)})};return i.rebindAll(o,e),i.rebind(o,a,"key"),o},F=function(){var e=null,n=z(),t=function(t){var r=n.mapping(),i=n.series(),a=n.xScale(),o=n.yScale();i.forEach(function(l,c){var u=r(t,c,i);l.context(e).xScale(a).yScale(o);var d=l.decorate();l.decorate(function(e,r,i){n.decorate()(e,t,c),d(e,r,i)}),l(u),l.decorate(d)})};return t.context=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],t):e},i.rebindAll(t,n),t},j=function(e){var n=function(){return 50},t="center",r=a.scaleBand(),o=f({decorate:function(){},xScale:a.scaleLinear()});return o.offsetScaleForDatum=function(e,i,a){var o=n(i,a),c=d(t,o),u=o/2;return r.domain(l.range(0,e.length)).range([-u+c,u+c])},o.bandwidth=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),o):n},o.align=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],o):t},i.rebindAll(o,r,i.includeMap({paddingInner:"paddingOuter"})),o},D=function(e){var t=j(),a=n.dataJoin("g","grouped"),o=function(n){n.selection&&a.transition(n),n.each(function(n,i,o){var l=a(r.select(o[i]),n);l.enter().append("g"),l.select("g").each(function(i,a,o){var l=r.select(o[a]),c=function(e,r){var i=t.offsetScaleForDatum(n,e,r);return t.xScale()(e)+i(a)+i.bandwidth()/2};e.xScale(c),e.bandwidth&&e.bandwidth(function(e,r){return t.offsetScaleForDatum(n,e,r).bandwidth()}),e.decorate(function(e,n){return t.decorate()(e,n,a)}),l.call(e)})})};return i.rebindAll(o,e,i.exclude("decorate","xScale")),i.rebindAll(o,t,i.exclude("offsetScaleForDatum")),o},M=function(e){var n=j(),t=function(t){t.forEach(function(r,i){var a=function(e,r){var a=n.offsetScaleForDatum(t,e,r);return n.xScale()(e)+a(i)+a.bandwidth()/2};e.xScale(a),e.bandwidth&&e.bandwidth(function(e,r){return n.offsetScaleForDatum(t,e,r).bandwidth()}),e.decorate(function(e,t){return n.decorate()(e,t,i)}),e(r)})};return i.rebindAll(t,e,i.exclude("decorate","xScale")),i.rebindAll(t,n,i.exclude("configureOffsetScale","configureOffset")),t},X=function(){var e="vertical",n=g(),t=q(),a=function(i){return i.each(function(i,a,o){"vertical"===e?t.series(i[0].map(function(e){return n})).mapping(function(e,n){return e.map(function(e){return e[n]})}):t.series(i.map(function(e){return n})).mapping(function(e,n){return e[n]}),r.select(o[a]).call(t)})};return a.series=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],a):n},a.orient=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],a):e},i.rebindAll(a,t,i.exclude("series","mapping")),a},Y=function(){var e="vertical",n=v(),t=F(),r=function(r){"vertical"===e?t.series(r[0].map(function(e){return n})).mapping(function(e,n){return e.map(function(e){return e[n]})}):t.series(r.map(function(e){return n})).mapping(function(e,n){return e[n]}),t(r)};return r.series=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],r):n},r.orient=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],r):e},i.rebindAll(r,t,i.exclude("series","mapping")),r},L=function(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)},H=function(e){return e.sort(l.ascending).filter(function(e,n,t){return-1===t.indexOf(e,n+1)})},R=function(e){var n=.75,t=function(e){if(e.length<=1)return 10;e=H(e);var t=l.pairs(e).map(function(e){return Math.abs(e[0]-e[1])}),r=l.min(t);return n*r},a=function(n,r,i){if(n.bandwidth)return n.bandwidth();var a,o=Array.isArray(r)?(a=[]).concat.apply(a,L(r)):r,l=o.filter(e.defined).map(i()).map(n);return t(l)},o=function(n){var t=function(n){if(e.xBandwidth&&e.yBandwidth)e.xBandwidth(a(e.xScale(),n,e.xValue)),e.yBandwidth(a(e.yScale(),n,e.yValue));else{var t=e.orient&&"horizontal"===e.orient()?e.yScale():e.xScale();e.bandwidth(a(t,n,e.crossValue))}};n instanceof r.selection?n.each(function(n,i,a){t(n),e(r.select(a[i]))}):(t(n),e(n))};return i.rebindAll(o,e),o.widthFraction=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],o):n},o},_=function(){var e=function(e){return e.x},n=function(e){return e.y},t=function(e){return e.color},r=function(){return 5},d=function(){return 5},s=a.interpolateViridis,h=f({decorate:function(){},defined:function(r,i){return c(e,n,t)(r,i)},xScale:a.scaleIdentity(),yScale:a.scaleIdentity()});return h.pathGenerator=o.shapeBar().x(0).y(0),h.colorScale=function(e){var n=e.map(t);return a.scaleLinear().domain([l.min(n),l.max(n)])},h.values=function(i,a){return{x:h.xScale()(e(i,a)),y:h.yScale()(n(i,a)),colorValue:t(i,a),width:d(i,a),height:r(i,a)}},h.xValue=function(){return arguments.length?(e=u(arguments.length<=0?void 0:arguments[0]),h):e},h.yValue=function(){return arguments.length?(n=u(arguments.length<=0?void 0:arguments[0]),h):n},h.colorValue=function(){return arguments.length?(t=u(arguments.length<=0?void 0:arguments[0]),h):t},h.colorInterpolate=function(){return arguments.length?(s=arguments.length<=0?void 0:arguments[0],h):s},h.xBandwidth=function(){return arguments.length?(d=u(arguments.length<=0?void 0:arguments[0]),h):d},h.yBandwidth=function(){return arguments.length?(r=u(arguments.length<=0?void 0:arguments[0]),h):r},i.rebindAll(h,h.pathGenerator,i.includeMap({horizontalAlign:"xAlign",verticalAlign:"yAlign"})),h},T=function(){var e=_(),t=n.dataJoin("g","box"),a=function(e){return"translate("+e.x+", "+e.y+")"},o=function(n){n.each(function(n,i,o){var l=n.filter(e.defined),c=e.colorValue(),u=e.colorInterpolate(),d=e.colorScale(l),f=t(r.select(o[i]),l);f.enter().append("path").attr("stroke","transparent"),f.attr("transform",function(n,t){return a(e.values(n,t))}).select("path").attr("d",function(n,t){return e.pathGenerator.width(e.values(n,t).width).height(e.values(n,t).height)([n])}).attr("fill",function(e,n){return u(d(c(e,n)))}),e.decorate()(f,n,i)})};return i.rebindAll(o,e),o},K=function(){var e=_(),n=function(n){var t=n.filter(e.defined),r=(e.colorValue(),e.colorInterpolate()),i=e.colorScale(t),a=e.pathGenerator.context();t.forEach(function(n,t){a.save(),a.beginPath();var o=e.values(n,t);a.translate(o.x,o.y),a.fillStyle=r(i(o.colorValue)),e.pathGenerator.height(o.height).width(o.width)([n]),e.decorate()(a,n,t),a.fill(),a.closePath(),a.restore()})};return i.rebind(n,e.pathGenerator,"context"),i.rebindAll(n,e),n};e.seriesSvgLine=g,e.seriesCanvasLine=v,e.seriesSvgPoint=p,e.seriesCanvasPoint=y,e.seriesSvgBar=b,e.seriesCanvasBar=x,e.seriesSvgErrorBar=S,e.seriesCanvasErrorBar=m,e.seriesSvgArea=A,e.seriesCanvasArea=k,e.seriesSvgCandlestick=B,e.seriesCanvasCandlestick=I,e.seriesSvgBoxPlot=E,e.seriesCanvasBoxPlot=O,e.seriesSvgOhlc=G,e.seriesCanvasOhlc=J,e.seriesSvgMulti=q,e.seriesCanvasMulti=F,e.seriesSvgGrouped=D,e.seriesCanvasGrouped=M,e.seriesSvgRepeat=X,e.seriesCanvasRepeat=Y,e.autoBandwidth=R,e.seriesSvgHeatmap=T,e.seriesCanvasHeatmap=K,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -40,3 +40,3 @@ {

},
"version": "3.2.0"
"version": "3.2.1"
}

@@ -38,20 +38,20 @@ import { scaleIdentity } from 'd3-scale';

if (orient === 'vertical') {
const y = base.yScale(highValue(d, i));
const y = base.yScale()(highValue(d, i));
return {
origin: [base.xScale(crossValue(d, i)) + offset, y],
origin: [base.xScale()(crossValue(d, i)) + offset, y],
high: 0,
upperQuartile: base.yScale(upperQuartileValue(d, i)) - y,
median: base.yScale(medianValue(d, i)) - y,
lowerQuartile: base.yScale(lowerQuartileValue(d, i)) - y,
low: base.yScale(lowValue(d, i)) - y,
upperQuartile: base.yScale()(upperQuartileValue(d, i)) - y,
median: base.yScale()(medianValue(d, i)) - y,
lowerQuartile: base.yScale()(lowerQuartileValue(d, i)) - y,
low: base.yScale()(lowValue(d, i)) - y,
width
};
} else {
const x = base.xScale(lowValue(d, i));
const x = base.xScale()(lowValue(d, i));
return {
origin: [x, base.yScale(crossValue(d, i)) + offset],
high: base.xScale(highValue(d, i)) - x,
upperQuartile: base.xScale(upperQuartileValue(d, i)) - x,
median: base.xScale(medianValue(d, i)) - x,
lowerQuartile: base.xScale(lowerQuartileValue(d, i)) - x,
origin: [x, base.yScale()(crossValue(d, i)) + offset],
high: base.xScale()(highValue(d, i)) - x,
upperQuartile: base.xScale()(upperQuartileValue(d, i)) - x,
median: base.xScale()(medianValue(d, i)) - x,
lowerQuartile: base.xScale()(lowerQuartileValue(d, i)) - x,
low: 0,

@@ -58,0 +58,0 @@ width

@@ -28,14 +28,14 @@ import { scaleIdentity } from 'd3-scale';

if (orient === 'vertical') {
const y = base.yScale(highValue(d, i));
const y = base.yScale()(highValue(d, i));
return {
origin: [base.xScale(crossValue(d, i)) + offset, y],
origin: [base.xScale()(crossValue(d, i)) + offset, y],
high: 0,
low: base.yScale(lowValue(d, i)) - y,
low: base.yScale()(lowValue(d, i)) - y,
width
};
} else {
const x = base.xScale(lowValue(d, i));
const x = base.xScale()(lowValue(d, i));
return {
origin: [x, base.yScale(crossValue(d, i)) + offset],
high: base.xScale(highValue(d, i)) - x,
origin: [x, base.yScale()(crossValue(d, i)) + offset],
high: base.xScale()(highValue(d, i)) - x,
low: 0,

@@ -42,0 +42,0 @@ width

@@ -37,4 +37,4 @@ import { scaleIdentity, interpolateViridis, scaleLinear } from 'd3-scale';

heatmap.values = (d, i) => ({
x: heatmap.xScale(xValue(d, i)),
y: heatmap.yScale(yValue(d, i)),
x: heatmap.xScale()(xValue(d, i)),
y: heatmap.yScale()(yValue(d, i)),
colorValue: colorValue(d, i),

@@ -41,0 +41,0 @@ width: xBandwidth(d, i),

@@ -17,3 +17,3 @@ import { scaleIdentity } from 'd3-scale';

let align = 'center';
let crossValueScaled = (d, i) => base.xScale(crossValue(d, i));
let crossValueScaled = (d, i) => base.xScale()(crossValue(d, i));

@@ -48,6 +48,6 @@ base = createBase({

cross: crossValueScaled(d, i) + offset,
open: base.yScale(openRaw),
high: base.yScale(highValue(d, i)),
low: base.yScale(lowValue(d, i)),
close: base.yScale(closeRaw),
open: base.yScale()(openRaw),
high: base.yScale()(highValue(d, i)),
low: base.yScale()(lowValue(d, i)),
close: base.yScale()(closeRaw),
width,

@@ -54,0 +54,0 @@ direction

@@ -28,5 +28,5 @@ import { scaleIdentity } from 'd3-scale';

if (orient === 'vertical') {
const y = base.yScale(mainValue(d, i), i);
const y0 = base.yScale(baseValue(d, i), i);
const x = base.xScale(crossValue(d, i), i) + offset;
const y = base.yScale()(mainValue(d, i), i);
const y0 = base.yScale()(baseValue(d, i), i);
const x = base.xScale()(crossValue(d, i), i) + offset;
return {

@@ -45,5 +45,5 @@ d,

} else {
const y = base.xScale(mainValue(d, i), i);
const y0 = base.xScale(baseValue(d, i), i);
const x = base.yScale(crossValue(d, i), i) + offset;
const y = base.xScale()(mainValue(d, i), i);
const y0 = base.xScale()(baseValue(d, i), i);
const x = base.yScale()(crossValue(d, i), i) + offset;
return {

@@ -50,0 +50,0 @@ d,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc