Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@d3fc/d3fc-chart

Package Overview
Dependencies
Maintainers
3
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@d3fc/d3fc-chart - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

135

build/d3fc-chart.js

@@ -628,2 +628,52 @@ (function (global, factory) {

var slicedToArray = function () {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if (Symbol.iterator in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
var toConsumableArray = function (arr) {

@@ -643,4 +693,6 @@ if (Array.isArray(arr)) {

var axis = function axis(orient, scale) {
var axisBase = function axisBase(orient, scale) {
var custom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var tickArguments = [10];

@@ -660,2 +712,12 @@ var tickValues = null;

var defaultLabelOffset = function defaultLabelOffset() {
return { offset: [0, tickSizeInner + tickPadding] };
};
var defaultTickPath = function defaultTickPath() {
return { path: [[0, 0], [0, tickSizeInner]] };
};
var labelOffset = custom.labelOffset || defaultLabelOffset;
var tickPath = custom.tickPath || defaultTickPath;
// returns a function that creates a translation based on

@@ -717,3 +779,10 @@ // the bound data

var sign = orient === 'bottom' || orient === 'right' ? 1 : -1;
var withSign = function withSign(_ref) {
var _ref2 = slicedToArray(_ref, 2),
x = _ref2[0],
y = _ref2[1];
return [x, sign * y];
};
// add the domain line

@@ -728,7 +797,15 @@ var range$$1 = scale.range();

var labelOffsets = ticksArray.map(function (d, i) {
return labelOffset(d, i, ticksArray);
});
var tickPaths = ticksArray.map(function (d, i) {
return tickPath(d, i, ticksArray);
});
// enter
g.enter().attr('transform', containerTranslate(scaleOld, translate)).append('path').attr('stroke', '#000');
var labelOffset = sign * (tickSizeInner + tickPadding);
g.enter().append('text').attr('transform', translate(0, labelOffset)).attr('fill', '#000');
g.enter().append('text').attr('transform', function (d, i) {
return translate.apply(undefined, toConsumableArray(withSign(labelOffsets[i].offset)));
}).attr('fill', '#000');

@@ -739,7 +816,13 @@ // exit

// update
g.select('path').attr('d', function (d) {
return svgDomainLine(pathTranspose([[0, 0], [0, sign * tickSizeInner]]));
g.select('path').attr('visibility', function (d, i) {
return tickPaths[i].hidden && 'hidden';
}).attr('d', function (d, i) {
return svgDomainLine(pathTranspose(tickPaths[i].path.map(withSign)));
});
g.select('text').attr('transform', translate(0, labelOffset)).attr('dy', function () {
g.select('text').attr('visibility', function (d, i) {
return labelOffsets[i].hidden && 'hidden';
}).attr('transform', function (d, i) {
return translate.apply(undefined, toConsumableArray(withSign(labelOffsets[i].offset)));
}).attr('dy', function () {
var offset = '0em';

@@ -844,2 +927,38 @@ if (isVertical()) {

var axis = function axis(orient, scale) {
var tickCenterLabel = false;
var labelOffset = function labelOffset(tick, index, ticksArray) {
var x = 0;
var y = base.tickSizeInner() + base.tickPadding();
var hidden = false;
if (tickCenterLabel) {
var thisPosition = scale(tick);
var nextPosition = index < ticksArray.length - 1 ? scale(ticksArray[index + 1]) : scale.range()[1];
x = (nextPosition - thisPosition) / 2;
y = base.tickPadding();
hidden = index === ticksArray.length - 1 && thisPosition === nextPosition;
}
return { offset: [x, y], hidden: hidden };
};
var base = axisBase(orient, scale, { labelOffset: labelOffset });
var axis = function axis(selection$$1) {
return base(selection$$1);
};
axis.tickCenterLabel = function () {
if (!arguments.length) {
return tickCenterLabel;
}
tickCenterLabel = arguments.length <= 0 ? undefined : arguments[0];
return axis;
};
rebindAll(axis, base);
return axis;
};
var axisTop = function axisTop(scale) {

@@ -974,5 +1093,5 @@ return axis('top', scale);

var svgPlotArea = multiSeries();
var xAxisStore = store('tickFormat', 'ticks', 'tickArguments', 'tickSize', 'tickSizeInner', 'tickSizeOuter', 'tickValues', 'tickPadding');
var xAxisStore = store('tickFormat', 'ticks', 'tickArguments', 'tickSize', 'tickSizeInner', 'tickSizeOuter', 'tickValues', 'tickPadding', 'tickCenterLabel');
var xDecorate = function xDecorate() {};
var yAxisStore = store('tickFormat', 'ticks', 'tickArguments', 'tickSize', 'tickSizeInner', 'tickSizeOuter', 'tickValues', 'tickPadding');
var yAxisStore = store('tickFormat', 'ticks', 'tickArguments', 'tickSize', 'tickSizeInner', 'tickSizeOuter', 'tickValues', 'tickPadding', 'tickCenterLabel');
var yDecorate = function yDecorate() {};

@@ -979,0 +1098,0 @@ var decorate = function decorate() {};

2

build/d3fc-chart.min.js

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-path"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-scale","d3-selection","d3-shape","d3-path","d3-array"],n):n(t.fc=t.fc||{},t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,n,e,r,i,a){"use strict";function o(){var t=arguments;return function(n,e){for(var r=0,i=t.length;r<i;r++)if(null==t[r](n,e))return!1;return!0}}var c=function(t,n,e){var r=n[e];if("function"!=typeof r)throw new Error("Attempt to rebind "+e+" which isn't a function on the source object");return function(){for(var e=arguments.length,i=Array(e),a=0;a<e;a++)i[a]=arguments[a];var o=r.apply(n,i);return o===n?t:o}},l=function(t,n){for(var e=arguments.length,r=Array(e>2?e-2:0),i=2;i<e;i++)r[i-2]=arguments[i];var a=!0,o=!1,l=void 0;try{for(var u,s=r[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var f=u.value;t[f]=c(t,n,f)}}catch(t){o=!0,l=t}finally{try{!a&&s.return&&s.return()}finally{if(o)throw l}}return t},u=function(t){return function(n){return t.reduce(function(t,n){return t&&n(t)},n)}},s=function(t,n){for(var e=arguments.length,r=Array(e>2?e-2:0),i=2;i<e;i++)r[i-2]=arguments[i];var a=u(r),o=!0,l=!1,s=void 0;try{for(var f,d=Object.keys(n)[Symbol.iterator]();!(o=(f=d.next()).done);o=!0){var g=f.value,h=a(g);h&&(t[h]=c(t,n,g))}}catch(t){l=!0,s=t}finally{try{!o&&d.return&&d.return()}finally{if(l)throw s}}return t},f=function(t){return t.map(function(t){return"string"==typeof t?new RegExp("^"+t+"$"):t})},d=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return n=f(n),function(t){return n.every(function(n){return!n.test(t)})&&t}},g=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return n=f(n),function(t){return n.some(function(n){return n.test(t)})&&t}},h=function(t){return t[0].toUpperCase()+t.slice(1)},m=function(t){return function(n){return t+h(n)}},v=function(t,n){t=t||"g";var e=function(t,n){return n},r=null,i=function(i,a){a=a||function(t){return t};var o=i.selection?i:null;o&&(i=i.selection());var c=i.selectAll(function(t,n,e){return Array.from(e[n].childNodes).filter(function(t){return 1===t.nodeType})}).filter(null==n?t:t+"."+n),l=c.data(a,e),u=l.enter().append(t).attr("class",n),s=l.exit();l=l.merge(u);var f=o||r;return f&&(l=l.transition(f).style("opacity",1),u.style("opacity",1e-6),s=s.transition(f).style("opacity",1e-6)),s.remove(),l.enter=function(){return u},l.exit=function(){return s},l};return i.element=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],i):t},i.className=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],i):n},i.key=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],i):e},i.transition=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],i):r},i},y=function(t){return"function"==typeof t?t:function(){return t}},p=function(t,n){switch(t){case"left":return n/2;case"right":return-n/2;default:return 0}},x=function(t){var n=Object.assign({},t),e=function(){};return Object.keys(n).forEach(function(t){e[t]=function(){return arguments.length?(n[t]=arguments.length<=0?void 0:arguments[0],e):n[t]}}),e},b=function(){var t=function(){return 0},e=function(t){return t.x},r=function(t){return t.y},i="center",a=function(){return 5},c="vertical",l=x({decorate:function(){},defined:function(n,i){return o(t,e,r)(n,i)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return l.values=function(n,o){var u=a(n,o),s=p(i,u),f=l.xScale(),d=l.yScale();if("vertical"===c){var g=d(r(n,o),o),h=d(t(n,o),o),m=f(e(n,o),o)+s;return{d:n,x:m,y:g,y0:h,width:u,height:g-h,origin:[m,g],baseOrigin:[m,h],transposedX:m,transposedY:g}}var v=f(r(n,o),o),y=f(t(n,o),o),x=d(e(n,o),o)+s;return{d:n,x:x,y:v,y0:y,width:u,height:v-y,origin:[v,x],baseOrigin:[y,x],transposedX:v,transposedY:x}},l.baseValue=function(){return arguments.length?(t=y(arguments.length<=0?void 0:arguments[0]),l):t},l.crossValue=function(){return arguments.length?(e=y(arguments.length<=0?void 0:arguments[0]),l):e},l.mainValue=function(){return arguments.length?(r=y(arguments.length<=0?void 0:arguments[0]),l):r},l.bandwidth=function(){return arguments.length?(a=y(arguments.length<=0?void 0:arguments[0]),l):a},l.align=function(){return arguments.length?(i=arguments.length<=0?void 0:arguments[0],l):i},l.orient=function(){return arguments.length?(c=arguments.length<=0?void 0:arguments[0],l):c},l},w={red:"#c60",green:"#6c0",black:"#000",gray:"#ddd",darkGray:"#999"},k=function(){var t=b(),n=r.line().x(function(n,e){return t.values(n,e).transposedX}).y(function(n,e){return t.values(n,e).transposedY}),i=v("path","line"),a=function(r){r.selection&&i.transition(r),n.defined(t.defined()),r.each(function(r,a,o){var c=i(e.select(o[a]),[r]);c.enter().attr("fill","none").attr("stroke",w.black),c.attr("d",n),t.decorate()(c,r,a)})};return s(a,t,d("baseValue","bandwidth","align")),l(a,i,"key"),l(a,n,"curve"),a},S=function(){var t=b(),n=r.line().x(function(n,e){return t.values(n,e).transposedX}).y(function(n,e){return t.values(n,e).transposedY}),e=function(e){var r=n.context();r.beginPath(),n.defined(t.defined())(e),r.strokeStyle=w.black,r.fillStyle="transparent",t.decorate()(r,e),r.fill(),r.stroke(),r.closePath()};return s(e,t,d("baseValue","bandwidth","align")),l(e,n,"curve","context"),e},A=function(){var t=[],e=function(t){return t},r=function(t,n){return n},i=x({decorate:function(){},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return i.mapping=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],i):e},i.key=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],i):r},i.series=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],i):t},i},O=function(){var t=A(),n=v("g"),r=v("g","multi"),i=function(i){i.selection&&(r.transition(i),n.transition(i));var a=t.mapping(),o=t.series(),c=t.xScale(),l=t.yScale();i.each(function(i,u,s){var f=r(e.select(s[u]),o);f.each(function(t,r,u){t.xScale(c).yScale(l);var s=a(i,r,o);n(e.select(u[r]),[s]).call(t)}),(f.selection?f.selection():f).order(),t.decorate()(f,i,u)})};return s(i,t),l(i,r,"key"),i},j=function(){var t=null,n=A(),e=function(e){var r=n.mapping(),i=n.series(),a=n.xScale(),o=n.yScale();i.forEach(function(c,l){var u=r(e,l,i);c.context(t).xScale(a).yScale(o);var s=c.decorate();c.decorate(function(t,r,i){n.decorate()(t,e,l),s(t,r,i)}),c(u),c.decorate(s)})};return e.context=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],e):t},s(e,n),e},_=function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)},z=function(t){return t},P=function(t,n){var i=[10],a=null,o=function(){},c=null,l=6,u=6,s=3,f=r.line(),d=v("g","tick").key(z),g=v("path","domain"),h=function(t,n){var e=0;return t.bandwidth&&(e=t.bandwidth()/2,t.round()&&(e=Math.round(e))),function(r){return n(t(r)+e,0)}},m=function(t,n){return p()?"translate("+n+", "+t+")":"translate("+t+", "+n+")"},y=function(t){return p()?t.map(function(t){return[t[1],t[0]]}):t},p=function(){return"left"===t||"right"===t},x=function(t,e,r){return n[t]?n[t].apply(n,e):r},b=function(r){r.selection&&(d.transition(r),g.transition(r)),r.each(function(r,v,b){var w=b[v],k=e.select(w);w.__scale__||k.attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor","right"===t?"start":"left"===t?"end":"middle");var S=w.__scale__||n;w.__scale__=n.copy();var A=null==a?x("ticks",i,n.domain()):a,O=null==c?x("tickFormat",i,z):c,j="bottom"===t||"right"===t?1:-1,_=n.range(),P=y([[_[0],j*l],[_[0],0],[_[1],0],[_[1],j*l]]);g(k,[r]).attr("d",f(P)).attr("stroke","#000");var I=d(k,A);I.enter().attr("transform",h(S,m)).append("path").attr("stroke","#000");var C=j*(u+s);I.enter().append("text").attr("transform",m(0,C)).attr("fill","#000"),I.exit().attr("transform",h(n,m)),I.select("path").attr("d",function(t){return f(y([[0,0],[0,j*u]]))}),I.select("text").attr("transform",m(0,C)).attr("dy",function(){var n="0em";return p()?n="0.32em":"bottom"===t&&(n="0.71em"),n}).text(O),I.attr("transform",h(n,m)),o(I,r,v)})};return b.tickFormat=function(){return arguments.length?(c=arguments.length<=0?void 0:arguments[0],b):c},b.tickSize=function(){return arguments.length?(u=l=Number(arguments.length<=0?void 0:arguments[0]),b):u},b.tickSizeInner=function(){return arguments.length?(u=Number(arguments.length<=0?void 0:arguments[0]),b):u},b.tickSizeOuter=function(){return arguments.length?(l=Number(arguments.length<=0?void 0:arguments[0]),b):l},b.tickPadding=function(){return arguments.length?(s=arguments.length<=0?void 0:arguments[0],b):s},b.decorate=function(){return arguments.length?(o=arguments.length<=0?void 0:arguments[0],b):o},b.scale=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],b):n},b.ticks=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return i=[].concat(n),b},b.tickArguments=function(){return arguments.length?(i=null==(arguments.length<=0?void 0:arguments[0])?[]:[].concat(_(arguments.length<=0?void 0:arguments[0])),b):i.slice()},b.tickValues=function(){return arguments.length?(a=null==(arguments.length<=0?void 0:arguments[0])?[]:[].concat(_(arguments.length<=0?void 0:arguments[0])),b):a.slice()},b},I=function(t){return P("top",t)},C=function(t){return P("bottom",t)},V=function(t){return P("left",t)},q=function(t){return P("right",t)},E=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];var r={},i=function(t){var n=!0,e=!1,i=void 0;try{for(var a,o=Object.keys(r)[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var c=a.value;t[c](r[c])}}catch(t){e=!0,i=t}finally{try{!n&&o.return&&o.return()}finally{if(e)throw i}}return t},a=!0,o=!1,c=void 0;try{for(var l,u=n[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var s=l.value;!function(t){i[t]=function(){return arguments.length?(r[t]=arguments.length<=0?void 0:arguments[0],i):r[t]}}(s)}}catch(t){o=!0,c=t}finally{try{!a&&u.return&&u.return()}finally{if(o)throw c}}return i},F="d3fc-group.cartesian-chart{width:100%;height:100%;overflow:hidden;display:grid;display:-ms-grid;grid-template-columns:minmax(1em,max-content) auto 1fr auto minmax(1em,max-content);-ms-grid-columns:minmax(1em,max-content) auto 1fr auto minmax(1em,max-content);grid-template-rows:minmax(1em,max-content) auto 1fr auto minmax(1em,max-content);-ms-grid-rows:minmax(1em,max-content) auto 1fr auto minmax(1em,max-content);}\nd3fc-group.cartesian-chart>.top-label{align-self:center;-ms-grid-column-align:center;justify-self:center;-ms-grid-row-align:center;grid-column:3;-ms-grid-column:3;-ms-grid-row:1;-ms-grid-row:1;}\nd3fc-group.cartesian-chart>.top-axis{height:2em;grid-column:3;-ms-grid-column:3;grid-row:2;-ms-grid-row:2;}\nd3fc-group.cartesian-chart>.left-label{align-self:center;-ms-grid-column-align:center;justify-self:center;-ms-grid-row-align:center;grid-column:1;-ms-grid-column:1;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.left-axis{width:3em;grid-column:2;-ms-grid-column:2;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.plot-area{overflow:hidden;grid-column:3;-ms-grid-column:3;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.right-axis{width:3em;grid-column:4;-ms-grid-column:4;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.right-label{align-self:center;-ms-grid-column-align:center;justify-self:center;-ms-grid-row-align:center;grid-column:5;-ms-grid-column:5;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.bottom-axis{height:2em;grid-column:3;-ms-grid-column:3;grid-row:4;-ms-grid-row:4;}\nd3fc-group.cartesian-chart>.bottom-label{align-self:center;-ms-grid-column-align:center;justify-self:center;-ms-grid-row-align:center;grid-column:3;-ms-grid-column:3;grid-row:5;-ms-grid-row:5;}",N=document.createElement("style");N.setAttribute("type","text/css"),document.querySelector("head").appendChild(N),N.styleSheet?N.styleSheet.cssText+=F:N.textContent+=F;var L=function(t){return"function"==typeof t?t:function(){return t}},X=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Y.apply(void 0,n),a=i.xScale,o=i.yScale,c=i.xAxis,l=i.yAxis,u=L(""),f=L(""),g=L(null),h=L(null),y=L("right"),p=L("bottom"),x=j(),b=O(),w=E("tickFormat","ticks","tickArguments","tickSize","tickSizeInner","tickSizeOuter","tickValues","tickPadding"),k=function(){},S=E("tickFormat","ticks","tickArguments","tickSize","tickSizeInner","tickSizeOuter","tickValues","tickPadding"),A=function(){},_=function(){},z=v("d3fc-group","cartesian-chart"),P=v("d3fc-svg","x-axis").key(function(t){return t}),I=v("d3fc-svg","y-axis").key(function(t){return t}),C=v("div","x-label").key(function(t){return t}),V=v("div","y-label").key(function(t){return t}),q=function(t){return function(n){return t.selection?n.transition(t):n}},F=function(t){var n=q(t);t.each(function(t,r,i){var s=z(e.select(i[r]),[t]);s.enter().attr("auto-resize","").html('<d3fc-svg class="plot-area"></d3fc-svg><d3fc-canvas class="plot-area"></d3fc-canvas>'),C(s,[p(t)]).attr("class",function(t){return"x-label "+t+"-label"}).text(u(t)),V(s,[y(t)]).attr("class",function(t){return"y-label "+t+"-label"}).text(f(t)),P(s,[p(t)]).attr("class",function(t){return"x-axis "+t+"-axis"}).style("height",g(t)).on("measure",function(t,n,r){var i=e.event.detail,o=i.width,c=i.height;"top"===t&&e.select(r[n]).select("svg").attr("viewBox","0 "+-c+" "+o+" "+c),a.range([0,o])}).on("draw",function(t,r,i){var o="top"===t?c.top(a):c.bottom(a);o.decorate(k),n(e.select(i[r])).select("svg").call(w(o))}),I(s,[y(t)]).attr("class",function(t){return"y-axis "+t+"-axis"}).style("width",h(t)).on("measure",function(t,n,r){var i=e.event.detail,a=i.width,c=i.height;"left"===t&&e.select(r[n]).select("svg").attr("viewBox",-a+" 0 "+a+" "+c),o.range([c,0])}).on("draw",function(t,r,i){var a="left"===t?l.left(o):l.right(o);a.decorate(A),n(e.select(i[r])).select("svg").call(S(a))}),s.select("d3fc-canvas.plot-area").on("draw",function(t,n,r){var i=e.select(r[n]).select("canvas").node();x.context(i.getContext("2d")).xScale(a).yScale(o),x(t)}),s.select("d3fc-svg.plot-area").on("draw",function(t,r,i){b.xScale(a).yScale(o),n(e.select(i[r])).select("svg").call(b)}),s.each(function(t,n,e){return e[n].requestRedraw()}),_(s,t,r)})},N=d(/range\w*/,/tickFormat/);return s(F,a,N,m("x")),s(F,o,N,m("y")),s(F,w,m("x")),s(F,S,m("y")),F.xOrient=function(){return arguments.length?(p=L(arguments.length<=0?void 0:arguments[0]),F):p},F.yOrient=function(){return arguments.length?(y=L(arguments.length<=0?void 0:arguments[0]),F):y},F.xDecorate=function(){return arguments.length?(k=arguments.length<=0?void 0:arguments[0],F):k},F.yDecorate=function(){return arguments.length?(A=arguments.length<=0?void 0:arguments[0],F):A},F.xLabel=function(){return arguments.length?(u=L(arguments.length<=0?void 0:arguments[0]),F):u},F.yLabel=function(){return arguments.length?(f=L(arguments.length<=0?void 0:arguments[0]),F):f},F.xAxisHeight=function(){return arguments.length?(g=L(arguments.length<=0?void 0:arguments[0]),F):g},F.yAxisWidth=function(){return arguments.length?(h=L(arguments.length<=0?void 0:arguments[0]),F):h},F.canvasPlotArea=function(){return arguments.length?(x=arguments.length<=0?void 0:arguments[0],F):x},F.svgPlotArea=function(){return arguments.length?(b=arguments.length<=0?void 0:arguments[0],F):b},F.decorate=function(){return arguments.length?(_=arguments.length<=0?void 0:arguments[0],F):_},F},Y=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var i={xScale:n.scaleIdentity(),yScale:n.scaleIdentity(),xAxis:{bottom:C,top:I},yAxis:{right:q,left:V}};return 1!==e.length||e[0].domain||e[0].range?Object.assign(i,{xScale:e[0]||i.xScale,yScale:e[1]||i.yScale}):Object.assign(i,e[0])},B=function(t){return"function"==typeof t?t:function(){return t}},D=function(t,n){return function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];var a=B(""),o=B(""),c=n,l=function(){},u=X.apply(void 0,r),f=function(n){t(u,c),u.decorate(function(t,n,e){t.enter().select(".x-label").style("height","1em").style("line-height","1em");var r=u.yOrient()(n);t.enter().append("div").attr("class","y-label-container").style("grid-column","left"===r?1:5).style("-ms-grid-column","left"===r?1:5).style("grid-row",3).style("-ms-grid-row",3).style("width","1em").style("display","flex").style("align-items","center").style("justify-content","center").append("div").attr("class","y-label").style("transform","rotate(-90deg)"),t.select(".y-label-container>.y-label").text(o),t.select(".top-label").style("margin-top","2em"),t.enter().append("div").attr("class","chart-label").style("grid-column",3).style("-ms-grid-column",3).style("grid-row",1).style("-ms-grid-row",1).style("height","2em").style("line-height","2em").style("text-align","center"),t.select(".chart-label").text(a(n)),l(t,n,e)}),n.call(u)};return s(f,u,g(/^x/,/^y/)),f.chartLabel=function(){return arguments.length?(a=B(arguments.length<=0?void 0:arguments[0]),f):a},f.yLabel=function(){return arguments.length?(o=B(arguments.length<=0?void 0:arguments[0]),f):o},f.plotArea=function(){return arguments.length?(c=arguments.length<=0?void 0:arguments[0],f):c},f.decorate=function(){return arguments.length?(l=arguments.length<=0?void 0:arguments[0],f):l},f}},M=D(function(t,n){return t.svgPlotArea(n)},k),R=D(function(t,n){return t.canvasPlotArea(n)},S);t.chartSvgCartesian=M,t.chartCanvasCartesian=R,t.chartCartesian=X,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-path"),require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-scale","d3-selection","d3-shape","d3-path","d3-array"],n):n(t.fc=t.fc||{},t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,n,e,r,i,a){"use strict";function o(){var t=arguments;return function(n,e){for(var r=0,i=t.length;r<i;r++)if(null==t[r](n,e))return!1;return!0}}var c=function(t,n,e){var r=n[e];if("function"!=typeof r)throw new Error("Attempt to rebind "+e+" which isn't a function on the source object");return function(){for(var e=arguments.length,i=Array(e),a=0;a<e;a++)i[a]=arguments[a];var o=r.apply(n,i);return o===n?t:o}},l=function(t,n){for(var e=arguments.length,r=Array(e>2?e-2:0),i=2;i<e;i++)r[i-2]=arguments[i];var a=!0,o=!1,l=void 0;try{for(var u,f=r[Symbol.iterator]();!(a=(u=f.next()).done);a=!0){var s=u.value;t[s]=c(t,n,s)}}catch(t){o=!0,l=t}finally{try{!a&&f.return&&f.return()}finally{if(o)throw l}}return t},u=function(t){return function(n){return t.reduce(function(t,n){return t&&n(t)},n)}},f=function(t,n){for(var e=arguments.length,r=Array(e>2?e-2:0),i=2;i<e;i++)r[i-2]=arguments[i];var a=u(r),o=!0,l=!1,f=void 0;try{for(var s,d=Object.keys(n)[Symbol.iterator]();!(o=(s=d.next()).done);o=!0){var g=s.value,h=a(g);h&&(t[h]=c(t,n,g))}}catch(t){l=!0,f=t}finally{try{!o&&d.return&&d.return()}finally{if(l)throw f}}return t},s=function(t){return t.map(function(t){return"string"==typeof t?new RegExp("^"+t+"$"):t})},d=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return n=s(n),function(t){return n.every(function(n){return!n.test(t)})&&t}},g=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return n=s(n),function(t){return n.some(function(n){return n.test(t)})&&t}},h=function(t){return t[0].toUpperCase()+t.slice(1)},v=function(t){return function(n){return t+h(n)}},m=function(t,n){t=t||"g";var e=function(t,n){return n},r=null,i=function(i,a){a=a||function(t){return t};var o=i.selection?i:null;o&&(i=i.selection());var c=i.selectAll(function(t,n,e){return Array.from(e[n].childNodes).filter(function(t){return 1===t.nodeType})}).filter(null==n?t:t+"."+n),l=c.data(a,e),u=l.enter().append(t).attr("class",n),f=l.exit();l=l.merge(u);var s=o||r;return s&&(l=l.transition(s).style("opacity",1),u.style("opacity",1e-6),f=f.transition(s).style("opacity",1e-6)),f.remove(),l.enter=function(){return u},l.exit=function(){return f},l};return i.element=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],i):t},i.className=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],i):n},i.key=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],i):e},i.transition=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],i):r},i},y=function(t){return"function"==typeof t?t:function(){return t}},p=function(t,n){switch(t){case"left":return n/2;case"right":return-n/2;default:return 0}},x=function(t){var n=Object.assign({},t),e=function(){};return Object.keys(n).forEach(function(t){e[t]=function(){return arguments.length?(n[t]=arguments.length<=0?void 0:arguments[0],e):n[t]}}),e},b=function(){var t=function(){return 0},e=function(t){return t.x},r=function(t){return t.y},i="center",a=function(){return 5},c="vertical",l=x({decorate:function(){},defined:function(n,i){return o(t,e,r)(n,i)},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return l.values=function(n,o){var u=a(n,o),f=p(i,u),s=l.xScale(),d=l.yScale();if("vertical"===c){var g=d(r(n,o),o),h=d(t(n,o),o),v=s(e(n,o),o)+f;return{d:n,x:v,y:g,y0:h,width:u,height:g-h,origin:[v,g],baseOrigin:[v,h],transposedX:v,transposedY:g}}var m=s(r(n,o),o),y=s(t(n,o),o),x=d(e(n,o),o)+f;return{d:n,x:x,y:m,y0:y,width:u,height:m-y,origin:[m,x],baseOrigin:[y,x],transposedX:m,transposedY:x}},l.baseValue=function(){return arguments.length?(t=y(arguments.length<=0?void 0:arguments[0]),l):t},l.crossValue=function(){return arguments.length?(e=y(arguments.length<=0?void 0:arguments[0]),l):e},l.mainValue=function(){return arguments.length?(r=y(arguments.length<=0?void 0:arguments[0]),l):r},l.bandwidth=function(){return arguments.length?(a=y(arguments.length<=0?void 0:arguments[0]),l):a},l.align=function(){return arguments.length?(i=arguments.length<=0?void 0:arguments[0],l):i},l.orient=function(){return arguments.length?(c=arguments.length<=0?void 0:arguments[0],l):c},l},w={red:"#c60",green:"#6c0",black:"#000",gray:"#ddd",darkGray:"#999"},k=function(){var t=b(),n=r.line().x(function(n,e){return t.values(n,e).transposedX}).y(function(n,e){return t.values(n,e).transposedY}),i=m("path","line"),a=function(r){r.selection&&i.transition(r),n.defined(t.defined()),r.each(function(r,a,o){var c=i(e.select(o[a]),[r]);c.enter().attr("fill","none").attr("stroke",w.black),c.attr("d",n),t.decorate()(c,r,a)})};return f(a,t,d("baseValue","bandwidth","align")),l(a,i,"key"),l(a,n,"curve"),a},S=function(){var t=b(),n=r.line().x(function(n,e){return t.values(n,e).transposedX}).y(function(n,e){return t.values(n,e).transposedY}),e=function(e){var r=n.context();r.beginPath(),n.defined(t.defined())(e),r.strokeStyle=w.black,r.fillStyle="transparent",t.decorate()(r,e),r.fill(),r.stroke(),r.closePath()};return f(e,t,d("baseValue","bandwidth","align")),l(e,n,"curve","context"),e},A=function(){var t=[],e=function(t){return t},r=function(t,n){return n},i=x({decorate:function(){},xScale:n.scaleIdentity(),yScale:n.scaleIdentity()});return i.mapping=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],i):e},i.key=function(){return arguments.length?(r=arguments.length<=0?void 0:arguments[0],i):r},i.series=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],i):t},i},O=function(){var t=A(),n=m("g"),r=m("g","multi"),i=function(i){i.selection&&(r.transition(i),n.transition(i));var a=t.mapping(),o=t.series(),c=t.xScale(),l=t.yScale();i.each(function(i,u,f){var s=r(e.select(f[u]),o);s.each(function(t,r,u){t.xScale(c).yScale(l);var f=a(i,r,o);n(e.select(u[r]),[f]).call(t)}),(s.selection?s.selection():s).order(),t.decorate()(s,i,u)})};return f(i,t),l(i,r,"key"),i},j=function(){var t=null,n=A(),e=function(e){var r=n.mapping(),i=n.series(),a=n.xScale(),o=n.yScale();i.forEach(function(c,l){var u=r(e,l,i);c.context(t).xScale(a).yScale(o);var f=c.decorate();c.decorate(function(t,r,i){n.decorate()(t,e,l),f(t,r,i)}),c(u),c.decorate(f)})};return e.context=function(){return arguments.length?(t=arguments.length<=0?void 0:arguments[0],e):t},f(e,n),e},_=function(){function t(t,n){var e=[],r=!0,i=!1,a=void 0;try{for(var o,c=t[Symbol.iterator]();!(r=(o=c.next()).done)&&(e.push(o.value),!n||e.length!==n);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}return e}return function(n,e){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return t(n,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)},z=function(t){return t},C=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[10],o=null,c=function(){},l=null,u=6,f=6,s=3,d=r.line(),g=m("g","tick").key(z),h=m("path","domain"),v=function(){return{offset:[0,f+s]}},y=function(){return{path:[[0,0],[0,f]]}},p=i.labelOffset||v,x=i.tickPath||y,b=function(t,n){var e=0;return t.bandwidth&&(e=t.bandwidth()/2,t.round()&&(e=Math.round(e))),function(r){return n(t(r)+e,0)}},w=function(t,n){return S()?"translate("+n+", "+t+")":"translate("+t+", "+n+")"},k=function(t){return S()?t.map(function(t){return[t[1],t[0]]}):t},S=function(){return"left"===t||"right"===t},A=function(t,e,r){return n[t]?n[t].apply(n,e):r},O=function(r){r.selection&&(g.transition(r),h.transition(r)),r.each(function(r,i,f){var s=f[i],v=e.select(s);s.__scale__||v.attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor","right"===t?"start":"left"===t?"end":"middle");var m=s.__scale__||n;s.__scale__=n.copy();var y=null==o?A("ticks",a,n.domain()):o,O=null==l?A("tickFormat",a,z):l,j="bottom"===t||"right"===t?1:-1,C=function(t){var n=_(t,2),e=n[0],r=n[1];return[e,j*r]},I=n.range(),V=k([[I[0],j*u],[I[0],0],[I[1],0],[I[1],j*u]]);h(v,[r]).attr("d",d(V)).attr("stroke","#000");var q=g(v,y),L=y.map(function(t,n){return p(t,n,y)}),E=y.map(function(t,n){return x(t,n,y)});q.enter().attr("transform",b(m,w)).append("path").attr("stroke","#000"),q.enter().append("text").attr("transform",function(t,n){return w.apply(void 0,P(C(L[n].offset)))}).attr("fill","#000"),q.exit().attr("transform",b(n,w)),q.select("path").attr("visibility",function(t,n){return E[n].hidden&&"hidden"}).attr("d",function(t,n){return d(k(E[n].path.map(C)))}),q.select("text").attr("visibility",function(t,n){return L[n].hidden&&"hidden"}).attr("transform",function(t,n){return w.apply(void 0,P(C(L[n].offset)))}).attr("dy",function(){var n="0em";return S()?n="0.32em":"bottom"===t&&(n="0.71em"),n}).text(O),q.attr("transform",b(n,w)),c(q,r,i)})};return O.tickFormat=function(){return arguments.length?(l=arguments.length<=0?void 0:arguments[0],O):l},O.tickSize=function(){return arguments.length?(f=u=Number(arguments.length<=0?void 0:arguments[0]),O):f},O.tickSizeInner=function(){return arguments.length?(f=Number(arguments.length<=0?void 0:arguments[0]),O):f},O.tickSizeOuter=function(){return arguments.length?(u=Number(arguments.length<=0?void 0:arguments[0]),O):u},O.tickPadding=function(){return arguments.length?(s=arguments.length<=0?void 0:arguments[0],O):s},O.decorate=function(){return arguments.length?(c=arguments.length<=0?void 0:arguments[0],O):c},O.scale=function(){return arguments.length?(n=arguments.length<=0?void 0:arguments[0],O):n},O.ticks=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return a=[].concat(n),O},O.tickArguments=function(){return arguments.length?(a=null==(arguments.length<=0?void 0:arguments[0])?[]:[].concat(P(arguments.length<=0?void 0:arguments[0])),O):a.slice()},O.tickValues=function(){return arguments.length?(o=null==(arguments.length<=0?void 0:arguments[0])?[]:[].concat(P(arguments.length<=0?void 0:arguments[0])),O):o.slice()},O},I=function(t,n){var e=!1,r=function(t,r,a){var o=0,c=i.tickSizeInner()+i.tickPadding(),l=!1;if(e){var u=n(t),f=r<a.length-1?n(a[r+1]):n.range()[1];o=(f-u)/2,c=i.tickPadding(),l=r===a.length-1&&u===f}return{offset:[o,c],hidden:l}},i=C(t,n,{labelOffset:r}),a=function(t){return i(t)};return a.tickCenterLabel=function(){return arguments.length?(e=arguments.length<=0?void 0:arguments[0],a):e},f(a,i),a},V=function(t){return I("top",t)},q=function(t){return I("bottom",t)},L=function(t){return I("left",t)},E=function(t){return I("right",t)},F=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];var r={},i=function(t){var n=!0,e=!1,i=void 0;try{for(var a,o=Object.keys(r)[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var c=a.value;t[c](r[c])}}catch(t){e=!0,i=t}finally{try{!n&&o.return&&o.return()}finally{if(e)throw i}}return t},a=!0,o=!1,c=void 0;try{for(var l,u=n[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var f=l.value;!function(t){i[t]=function(){return arguments.length?(r[t]=arguments.length<=0?void 0:arguments[0],i):r[t]}}(f)}}catch(t){o=!0,c=t}finally{try{!a&&u.return&&u.return()}finally{if(o)throw c}}return i},N="d3fc-group.cartesian-chart{width:100%;height:100%;overflow:hidden;display:grid;display:-ms-grid;grid-template-columns:minmax(1em,max-content) auto 1fr auto minmax(1em,max-content);-ms-grid-columns:minmax(1em,max-content) auto 1fr auto minmax(1em,max-content);grid-template-rows:minmax(1em,max-content) auto 1fr auto minmax(1em,max-content);-ms-grid-rows:minmax(1em,max-content) auto 1fr auto minmax(1em,max-content);}\nd3fc-group.cartesian-chart>.top-label{align-self:center;-ms-grid-column-align:center;justify-self:center;-ms-grid-row-align:center;grid-column:3;-ms-grid-column:3;-ms-grid-row:1;-ms-grid-row:1;}\nd3fc-group.cartesian-chart>.top-axis{height:2em;grid-column:3;-ms-grid-column:3;grid-row:2;-ms-grid-row:2;}\nd3fc-group.cartesian-chart>.left-label{align-self:center;-ms-grid-column-align:center;justify-self:center;-ms-grid-row-align:center;grid-column:1;-ms-grid-column:1;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.left-axis{width:3em;grid-column:2;-ms-grid-column:2;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.plot-area{overflow:hidden;grid-column:3;-ms-grid-column:3;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.right-axis{width:3em;grid-column:4;-ms-grid-column:4;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.right-label{align-self:center;-ms-grid-column-align:center;justify-self:center;-ms-grid-row-align:center;grid-column:5;-ms-grid-column:5;grid-row:3;-ms-grid-row:3;}\nd3fc-group.cartesian-chart>.bottom-axis{height:2em;grid-column:3;-ms-grid-column:3;grid-row:4;-ms-grid-row:4;}\nd3fc-group.cartesian-chart>.bottom-label{align-self:center;-ms-grid-column-align:center;justify-self:center;-ms-grid-row-align:center;grid-column:3;-ms-grid-column:3;grid-row:5;-ms-grid-row:5;}",X=document.createElement("style");X.setAttribute("type","text/css"),document.querySelector("head").appendChild(X),X.styleSheet?X.styleSheet.cssText+=N:X.textContent+=N;var Y=function(t){return"function"==typeof t?t:function(){return t}},T=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=B.apply(void 0,n),a=i.xScale,o=i.yScale,c=i.xAxis,l=i.yAxis,u=Y(""),s=Y(""),g=Y(null),h=Y(null),y=Y("right"),p=Y("bottom"),x=j(),b=O(),w=F("tickFormat","ticks","tickArguments","tickSize","tickSizeInner","tickSizeOuter","tickValues","tickPadding","tickCenterLabel"),k=function(){},S=F("tickFormat","ticks","tickArguments","tickSize","tickSizeInner","tickSizeOuter","tickValues","tickPadding","tickCenterLabel"),A=function(){},_=function(){},P=m("d3fc-group","cartesian-chart"),z=m("d3fc-svg","x-axis").key(function(t){return t}),C=m("d3fc-svg","y-axis").key(function(t){return t}),I=m("div","x-label").key(function(t){return t}),V=m("div","y-label").key(function(t){return t}),q=function(t){return function(n){return t.selection?n.transition(t):n}},L=function(t){var n=q(t);t.each(function(t,r,i){var f=P(e.select(i[r]),[t]);f.enter().attr("auto-resize","").html('<d3fc-svg class="plot-area"></d3fc-svg><d3fc-canvas class="plot-area"></d3fc-canvas>'),I(f,[p(t)]).attr("class",function(t){return"x-label "+t+"-label"}).text(u(t)),V(f,[y(t)]).attr("class",function(t){return"y-label "+t+"-label"}).text(s(t)),z(f,[p(t)]).attr("class",function(t){return"x-axis "+t+"-axis"}).style("height",g(t)).on("measure",function(t,n,r){var i=e.event.detail,o=i.width,c=i.height;"top"===t&&e.select(r[n]).select("svg").attr("viewBox","0 "+-c+" "+o+" "+c),a.range([0,o])}).on("draw",function(t,r,i){var o="top"===t?c.top(a):c.bottom(a);o.decorate(k),n(e.select(i[r])).select("svg").call(w(o))}),C(f,[y(t)]).attr("class",function(t){return"y-axis "+t+"-axis"}).style("width",h(t)).on("measure",function(t,n,r){var i=e.event.detail,a=i.width,c=i.height;"left"===t&&e.select(r[n]).select("svg").attr("viewBox",-a+" 0 "+a+" "+c),o.range([c,0])}).on("draw",function(t,r,i){var a="left"===t?l.left(o):l.right(o);a.decorate(A),n(e.select(i[r])).select("svg").call(S(a))}),f.select("d3fc-canvas.plot-area").on("draw",function(t,n,r){var i=e.select(r[n]).select("canvas").node();x.context(i.getContext("2d")).xScale(a).yScale(o),x(t)}),f.select("d3fc-svg.plot-area").on("draw",function(t,r,i){b.xScale(a).yScale(o),n(e.select(i[r])).select("svg").call(b)}),f.each(function(t,n,e){return e[n].requestRedraw()}),_(f,t,r)})},E=d(/range\w*/,/tickFormat/);return f(L,a,E,v("x")),f(L,o,E,v("y")),f(L,w,v("x")),f(L,S,v("y")),L.xOrient=function(){return arguments.length?(p=Y(arguments.length<=0?void 0:arguments[0]),L):p},L.yOrient=function(){return arguments.length?(y=Y(arguments.length<=0?void 0:arguments[0]),L):y},L.xDecorate=function(){return arguments.length?(k=arguments.length<=0?void 0:arguments[0],L):k},L.yDecorate=function(){return arguments.length?(A=arguments.length<=0?void 0:arguments[0],L):A},L.xLabel=function(){return arguments.length?(u=Y(arguments.length<=0?void 0:arguments[0]),L):u},L.yLabel=function(){return arguments.length?(s=Y(arguments.length<=0?void 0:arguments[0]),L):s},L.xAxisHeight=function(){return arguments.length?(g=Y(arguments.length<=0?void 0:arguments[0]),L):g},L.yAxisWidth=function(){return arguments.length?(h=Y(arguments.length<=0?void 0:arguments[0]),L):h},L.canvasPlotArea=function(){return arguments.length?(x=arguments.length<=0?void 0:arguments[0],L):x},L.svgPlotArea=function(){return arguments.length?(b=arguments.length<=0?void 0:arguments[0],L):b},L.decorate=function(){return arguments.length?(_=arguments.length<=0?void 0:arguments[0],L):_},L},B=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var i={xScale:n.scaleIdentity(),yScale:n.scaleIdentity(),xAxis:{bottom:q,top:V},yAxis:{right:E,left:L}};return 1!==e.length||e[0].domain||e[0].range?Object.assign(i,{xScale:e[0]||i.xScale,yScale:e[1]||i.yScale}):Object.assign(i,e[0])},D=function(t){return"function"==typeof t?t:function(){return t}},M=function(t,n){return function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];var a=D(""),o=D(""),c=n,l=function(){},u=T.apply(void 0,r),s=function(n){t(u,c),u.decorate(function(t,n,e){t.enter().select(".x-label").style("height","1em").style("line-height","1em");var r=u.yOrient()(n);t.enter().append("div").attr("class","y-label-container").style("grid-column","left"===r?1:5).style("-ms-grid-column","left"===r?1:5).style("grid-row",3).style("-ms-grid-row",3).style("width","1em").style("display","flex").style("align-items","center").style("justify-content","center").append("div").attr("class","y-label").style("transform","rotate(-90deg)"),t.select(".y-label-container>.y-label").text(o),t.select(".top-label").style("margin-top","2em"),t.enter().append("div").attr("class","chart-label").style("grid-column",3).style("-ms-grid-column",3).style("grid-row",1).style("-ms-grid-row",1).style("height","2em").style("line-height","2em").style("text-align","center"),t.select(".chart-label").text(a(n)),l(t,n,e)}),n.call(u)};return f(s,u,g(/^x/,/^y/)),s.chartLabel=function(){return arguments.length?(a=D(arguments.length<=0?void 0:arguments[0]),s):a},s.yLabel=function(){return arguments.length?(o=D(arguments.length<=0?void 0:arguments[0]),s):o},s.plotArea=function(){return arguments.length?(c=arguments.length<=0?void 0:arguments[0],s):c},s.decorate=function(){return arguments.length?(l=arguments.length<=0?void 0:arguments[0],s):l},s}},R=M(function(t,n){return t.svgPlotArea(n)},k),G=M(function(t,n){return t.canvasPlotArea(n)},S);t.chartSvgCartesian=R,t.chartCanvasCartesian=G,t.chartCartesian=T,Object.defineProperty(t,"__esModule",{value:!0})});

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

<a name="2.5.0"></a>
# [2.5.0](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-chart@2.4.0...@d3fc/d3fc-chart@2.5.0) (2019-03-14)
### Features
* Two types of axis components, with specialisations ([5269d28](https://github.com/d3fc/d3fc/commit/5269d28))
<a name="2.4.0"></a>

@@ -8,0 +19,0 @@ # [2.4.0](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-chart@2.3.0...@d3fc/d3fc-chart@2.4.0) (2019-03-11)

{
"name": "@d3fc/d3fc-chart",
"version": "2.4.0",
"version": "2.5.0",
"description": "A simple Cartesian chart component that renders to canvas or SVG.",

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

"dependencies": {
"@d3fc/d3fc-axis": "^2.0.10",
"@d3fc/d3fc-axis": "^2.1.0",
"@d3fc/d3fc-data-join": "^5.0.7",

@@ -34,0 +34,0 @@ "@d3fc/d3fc-element": "^5.2.0",

@@ -317,2 +317,2 @@ # d3fc-chart

The Cartesian chart exposes the [d3fc-axis](https://github.com/d3fc/d3fc/tree/master/packages/d3fc-axis#d3fc-axis) *ticks*, *tickSize*, *tickValue*, *tickFormat* and *decorate* properties with either an `x` or `y` prefix.
The Cartesian chart exposes the [d3fc-axis](https://github.com/d3fc/d3fc/tree/master/packages/d3fc-axis#d3fc-axis) *ticks*, *tickSize*, *tickValue*, *tickFormat*, *tickArguments*, *tickSizeInner*, *tickSizeOuter*, *tickPadding*, *tickCenterLabel* and *decorate* properties with either an `x` or `y` prefix.

@@ -24,5 +24,5 @@ import { select, event } from 'd3-selection';

let svgPlotArea = seriesSvgMulti();
let xAxisStore = store('tickFormat', 'ticks', 'tickArguments', 'tickSize', 'tickSizeInner', 'tickSizeOuter', 'tickValues', 'tickPadding');
let xAxisStore = store('tickFormat', 'ticks', 'tickArguments', 'tickSize', 'tickSizeInner', 'tickSizeOuter', 'tickValues', 'tickPadding', 'tickCenterLabel');
let xDecorate = () => { };
let yAxisStore = store('tickFormat', 'ticks', 'tickArguments', 'tickSize', 'tickSizeInner', 'tickSizeOuter', 'tickValues', 'tickPadding');
let yAxisStore = store('tickFormat', 'ticks', 'tickArguments', 'tickSize', 'tickSizeInner', 'tickSizeOuter', 'tickValues', 'tickPadding', 'tickCenterLabel');
let yDecorate = () => { };

@@ -29,0 +29,0 @@ let decorate = () => { };

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