Socket
Socket
Sign inDemoInstall

@d3fc/d3fc-series

Package Overview
Dependencies
Maintainers
3
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@d3fc/d3fc-series - npm Package Compare versions

Comparing version 4.0.29 to 4.1.0

test/accessorsSpec.js

2

build/d3fc-series.min.js

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

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

@@ -6,2 +6,13 @@ # Change Log

# [4.1.0](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-series@4.0.29...@d3fc/d3fc-series@4.1.0) (2019-11-19)
### Features
* add xValues/yValues to all series ([#1335](https://github.com/d3fc/d3fc/issues/1335)) ([413b611](https://github.com/d3fc/d3fc/commit/413b611))
## [4.0.29](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-series@4.0.28...@d3fc/d3fc-series@4.0.29) (2019-09-04)

@@ -8,0 +19,0 @@

{
"name": "@d3fc/d3fc-series",
"version": "4.0.29",
"version": "4.1.0",
"description": "A collection of components for rendering data series to SVG and canvas, including line, bar, OHLC, candlestick and more",

@@ -44,3 +44,3 @@ "license": "MIT",

},
"gitHead": "d216bebca76b9bde7456f1c06e768bc67814dd2e"
"gitHead": "21a444e11a6f63d2ce64625578fef83d1304050c"
}

@@ -51,2 +51,3 @@ # d3fc-series

* [Auto Bandwidth](#auto-bandwidth)
* [Accessors](#accessors)
* [Line](#line)

@@ -335,2 +336,6 @@ * [Point](#point)

#### Accessors
All of the series expose `xValues`/`yValues` methods which return an array of all of the accessors used by the series when retrieving values for use with the `xScale`/`yScale` respectively.
### Line

@@ -337,0 +342,0 @@

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

const base = createBase({
decorate: () => {},
decorate: () => { },
defined: (d, i) => defined(

@@ -65,2 +65,16 @@ lowValue,

base.xValues = () => orient === 'vertical' ? [crossValue] : [
upperQuartileValue,
lowerQuartileValue,
highValue,
lowValue,
medianValue
];
base.yValues = () => orient !== 'vertical' ? [crossValue] : [
upperQuartileValue,
lowerQuartileValue,
highValue,
lowValue,
medianValue
];
base.orient = (...args) => {

@@ -67,0 +81,0 @@ if (!args.length) {

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

const base = createBase({
decorate: () => {},
decorate: () => { },
defined: (d, i) => defined(lowValue, highValue, crossValue)(d, i),

@@ -49,2 +49,10 @@ xScale: scaleIdentity(),

base.xValues = () => orient === 'vertical' ? [crossValue] : [
highValue,
lowValue
];
base.yValues = () => orient !== 'vertical' ? [crossValue] : [
highValue,
lowValue
];
base.orient = (...args) => {

@@ -51,0 +59,0 @@ if (!args.length) {

@@ -44,2 +44,5 @@ import { scaleIdentity, interpolateViridis, scaleLinear } from 'd3-scale';

heatmap.xValues = () => [xValue];
heatmap.yValues = () => [yValue];
heatmap.xValue = (...args) => {

@@ -46,0 +49,0 @@ if (!args.length) {

@@ -16,2 +16,6 @@ import {scaleIdentity} from 'd3-scale';

multi.xValues = () => series.map(s => s.xValues())
.reduce((a, b) => a.concat(b));
multi.yValues = () => series.map(s => s.yValues())
.reduce((a, b) => a.concat(b));
multi.mapping = (...args) => {

@@ -18,0 +22,0 @@ if (!args.length) {

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

base = createBase({
decorate: () => {},
decorate: () => { },
defined: (d, i) => defined(

@@ -57,2 +57,9 @@ crossValue,

base.xValues = () => [crossValue];
base.yValues = () => [
openValue,
highValue,
lowValue,
closeValue
];
base.crossValue = (...args) => {

@@ -59,0 +66,0 @@ if (!args.length) {

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

const base = createBase({
decorate: () => {},
decorate: () => { },
defined: (d, i) => defined(baseValue, crossValue, mainValue)(d, i),

@@ -65,2 +65,10 @@ xScale: scaleIdentity(),

base.xValues = () => orient === 'vertical' ? [crossValue] : [
baseValue,
mainValue
];
base.yValues = () => orient !== 'vertical' ? [crossValue] : [
baseValue,
mainValue
];
base.baseValue = (...args) => {

@@ -67,0 +75,0 @@ if (!args.length) {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc