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.1.0 to 3.1.1

12

build/d3fc-series.js

@@ -204,3 +204,7 @@ (function (global, factory) {

var path = join(d3Selection.select(group[index]), [data]);
path.attr('d', lineData).attr('fill', 'none').attr('stroke', colors.black);
path.enter().attr('fill', 'none').attr('stroke', colors.black);
path.attr('d', lineData);
base.decorate()(path, data, index);

@@ -702,3 +706,7 @@ });

var path = join(d3Selection.select(group[index]), [data]);
path.attr('d', areaData).attr('fill', colors.gray);
path.enter().attr('fill', colors.gray);
path.attr('d', areaData);
base.decorate()(path, data, index);

@@ -705,0 +713,0 @@ });

2

build/d3fc-series.min.js

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

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

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

},
"version": "3.1.0"
"version": "3.1.1"
}

@@ -33,4 +33,8 @@ import {dataJoin} from 'd3fc-data-join';

const path = join(select(group[index]), [data]);
path.attr('d', areaData)
.attr('fill', colors.gray);
path.enter()
.attr('fill', colors.gray);
path.attr('d', areaData);
base.decorate()(path, data, index);

@@ -37,0 +41,0 @@ });

@@ -26,5 +26,9 @@ import {dataJoin} from 'd3fc-data-join';

const path = join(select(group[index]), [data]);
path.attr('d', lineData)
.attr('fill', 'none')
.attr('stroke', colors.black);
path.enter()
.attr('fill', 'none')
.attr('stroke', colors.black);
path.attr('d', lineData);
base.decorate()(path, data, index);

@@ -31,0 +35,0 @@ });

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