New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dchart-core

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dchart-core - npm Package Compare versions

Comparing version 1.1.12 to 1.1.13

2

area/area.js

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

function AreaMulti(e,t){var a={xaxis:{orient:"bottom"},yaxis:{}};a=_.deepMerge(a,t),DataV.call(this,e,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");AreaMulti=DataV.extend(AreaMulti,{data:function(e){if(!e)return this._data;var t=this.options,a=t.yaxis.key;e.forEach(function(e){_.isArray(e[a])||(e[a]=[e[a]])}),this._data=e},renderSeries:function(){this.svg.classed("area-chart-g",!0);var e,t,a=this.options,i=this.data(),r=a.xaxis.key,n=a.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),d=_.maxBy(i,function(e){return e[n].length})[n].length;this.series=this.series.datum(i).each(function(){for(var e=d3.select(this),i=0;d>i;i++){var u=d3.svg.area().x(function(e){return"time"===a.xaxis.type&&"string"==typeof e[r]?s(new Date(e[r]))+(s.rangeBand?s.rangeBand()/2:0):s(e[r])+(s.rangeBand?s.rangeBand()/2:0)}).y0(o(t.getMin())).y1(function(e){return o(e[n][i]||t.getMin())});a.interpolate&&u.interpolate(a.interpolate),e.append("path").attr({"class":"serie serie"+(i+1),d:u})}})},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){var e=this.options,t=this.data(),a=this.getComs("axis","xaxis"),i=this.getComs("axis","yaxis"),r=e.xaxis.key,n=e.yaxis.key,s=a.getX(),o=i.getX(),d=_.maxBy(t,function(e){return e[n].length})[n].length;this.series.datum(t),this.series.each(function(){for(var t=d3.select(this),a=0;d>a;a++){var u=d3.svg.area().x(function(t){return"time"===e.xaxis.type&&"string"==typeof t[r]?s(new Date(t[r]))+(s.rangeBand?s.rangeBand()/2:0):s(t[r])+(s.rangeBand?s.rangeBand()/2:0)}).y0(o(i.getMin())).y1(function(e){return o(e[n][a]||i.getMin())});e.interpolate&&u.interpolate(e.interpolate),t.select(".serie"+(a+1)).attr({d:u})}}),this.series.selectAll(".serie.serie"+d+" + .serie").remove()}}),module.exports=AreaMulti;
function AreaMulti(e,t){var a={xaxis:{orient:"bottom"},yaxis:{}};a=_.deepMerge(a,t),DataV.call(this,e,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");AreaMulti=DataV.extend(AreaMulti,{data:function(e){if(!e)return this._data;var t=this.options,a=t.yaxis.key;e.forEach(function(e){_.isArray(e[a])||(e[a]=[e[a]])}),this._data=e},renderSeries:function(){this.svg.classed("area-chart-g",!0);var e,t,a=this.options,i=this.data(),r=a.xaxis.key,n=a.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),d=_.maxBy(i,function(e){return e[n].length})[n].length;this.series=this.series.datum(i).each(function(){for(var e=d3.select(this),i=0;d>i;i++){var u=d3.svg.area().x(function(e){return"time"===a.xaxis.type&&"string"==typeof e[r]?s(new Date(e[r]))+(s.rangeBand?s.rangeBand()/2:0):s(e[r])+(s.rangeBand?s.rangeBand()/2:0)}).y0(o(t.getMin())).y1(function(e){return o(e[n][i]||t.getMin())});a.interpolate&&u.interpolate(a.interpolate),e.append("path").attr({"class":"serie serie"+(i+1),d:u})}})},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){var e=this.options,t=this.data(),a=this.getComs("axis","xaxis"),i=this.getComs("axis","yaxis"),r=e.xaxis.key,n=e.yaxis.key,s=a.getX(),o=i.getX(),d=_.maxBy(t,function(e){return e[n].length})[n].length;this.series.datum(t),this.series.each(function(){for(var t=d3.select(this),a=0;d>a;a++){var u=d3.svg.area().x(function(t){return"time"===e.xaxis.type&&"string"==typeof t[r]?s(new Date(t[r]))+(s.rangeBand?s.rangeBand()/2:0):s(t[r])+(s.rangeBand?s.rangeBand()/2:0)}).y0(o(i.getMin())).y1(function(e){return o(e[n][a]||i.getMin())});e.interpolate&&u.interpolate(e.interpolate),t.select(".serie"+(a+1)).attr({d:u})}}),this.series.selectAll(".serie.serie"+d+" ~ .serie").remove()}}),module.exports=AreaMulti;

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

function AreaMulti(e,t){var a={xaxis:{orient:"bottom"},yaxis:{}};a=_.deepMerge(a,t),DataV.call(this,e,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");AreaMulti=DataV.extend(AreaMulti,{data:function(e){if(!e)return this._data;var t=this.options,a=t.yaxis.key;e.forEach(function(e){_.isArray(e[a])||(e[a]=[e[a]])}),this._data=e},renderSeries:function(){this.svg.classed("area-chart-g",!0);var e,t,a=this.options,i=this.data(),r=a.xaxis.key,n=a.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),d=_.maxBy(i,function(e){return e[n].length})[n].length;this.series=this.series.datum(i).each(function(){for(var e=d3.select(this),i=0;d>i;i++){var u=d3.svg.area().x(function(e){return"time"===a.xaxis.type&&"string"==typeof e[r]?s(new Date(e[r]))+(s.rangeBand?s.rangeBand()/2:0):s(e[r])+(s.rangeBand?s.rangeBand()/2:0)}).y0(o(t.getMin())).y1(function(e){return o(e[n][i]||t.getMin())});a.interpolate&&u.interpolate(a.interpolate),e.append("path").attr({"class":"serie serie"+(i+1),d:u})}})},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){var e=this.options,t=this.data(),a=this.getComs("axis","xaxis"),i=this.getComs("axis","yaxis"),r=e.xaxis.key,n=e.yaxis.key,s=a.getX(),o=i.getX(),d=_.maxBy(t,function(e){return e[n].length})[n].length;this.series.datum(t),this.series.each(function(){for(var t=d3.select(this),a=0;d>a;a++){var u=d3.svg.area().x(function(t){return"time"===e.xaxis.type&&"string"==typeof t[r]?s(new Date(t[r]))+(s.rangeBand?s.rangeBand()/2:0):s(t[r])+(s.rangeBand?s.rangeBand()/2:0)}).y0(o(i.getMin())).y1(function(e){return o(e[n][a]||i.getMin())});e.interpolate&&u.interpolate(e.interpolate),t.select(".serie"+(a+1)).attr({d:u})}}),this.series.selectAll(".serie.serie"+d+" + .serie").remove()}}),module.exports=AreaMulti;
function AreaMulti(e,t){var a={xaxis:{orient:"bottom"},yaxis:{}};a=_.deepMerge(a,t),DataV.call(this,e,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");AreaMulti=DataV.extend(AreaMulti,{data:function(e){if(!e)return this._data;var t=this.options,a=t.yaxis.key;e.forEach(function(e){_.isArray(e[a])||(e[a]=[e[a]])}),this._data=e},renderSeries:function(){this.svg.classed("area-chart-g",!0);var e,t,a=this.options,i=this.data(),r=a.xaxis.key,n=a.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),d=_.maxBy(i,function(e){return e[n].length})[n].length;this.series=this.series.datum(i).each(function(){for(var e=d3.select(this),i=0;d>i;i++){var u=d3.svg.area().x(function(e){return"time"===a.xaxis.type&&"string"==typeof e[r]?s(new Date(e[r]))+(s.rangeBand?s.rangeBand()/2:0):s(e[r])+(s.rangeBand?s.rangeBand()/2:0)}).y0(o(t.getMin())).y1(function(e){return o(e[n][i]||t.getMin())});a.interpolate&&u.interpolate(a.interpolate),e.append("path").attr({"class":"serie serie"+(i+1),d:u})}})},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){var e=this.options,t=this.data(),a=this.getComs("axis","xaxis"),i=this.getComs("axis","yaxis"),r=e.xaxis.key,n=e.yaxis.key,s=a.getX(),o=i.getX(),d=_.maxBy(t,function(e){return e[n].length})[n].length;this.series.datum(t),this.series.each(function(){for(var t=d3.select(this),a=0;d>a;a++){var u=d3.svg.area().x(function(t){return"time"===e.xaxis.type&&"string"==typeof t[r]?s(new Date(t[r]))+(s.rangeBand?s.rangeBand()/2:0):s(t[r])+(s.rangeBand?s.rangeBand()/2:0)}).y0(o(i.getMin())).y1(function(e){return o(e[n][a]||i.getMin())});e.interpolate&&u.interpolate(e.interpolate),t.select(".serie"+(a+1)).attr({d:u})}}),this.series.selectAll(".serie.serie"+d+" ~ .serie").remove()}}),module.exports=AreaMulti;

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

function BarMulti(e,t){var i={xaxis:{type:"category",orient:"bottom"},groupLabel:null,yaxis:{}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMulti=DataV.extend(BarMulti,{data:function(e){if(!e)return this._data;var t=this.options,i=t.yaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),n=i.xaxis.key,a=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),u=t.getX(),o=_.maxBy(r,function(e){return e[a].length})[a].length,c=e.calGroupStep(i.groupLabel||r[0][a].length),h=function(e,r,o){var h=d3.select(this);i.withAnimated&&(i.isFirst&&h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(){return u(t.getMin())},width:function(){return c.rangeBand()},height:0}),h.transition().duration(i.animatedTiming).ease(i.animatedEasing)),e[a][o]!==t.getMin()&&void 0!==e[a][o]&&h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(e){return u(e[a][o])},width:function(){return c.rangeBand()},height:function(e){return u(t.getMin())-u(e[a][o])}})||h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(){return u(t.getMin())-1},width:function(){return c.rangeBand()},height:function(){return 1}})},l=this.series.selectAll(".series-group").data(this._data);this.enterSeries=l.enter().append("g").attr("class","series-group");for(var d=0;o>d;d++)l.each(function(e,t){var i=d3.select(this).select(".serie"+(d+1))[0][0];i&&h.call(d3.select(this).select(".serie"+(d+1))[0][0],e,t,d)}),this.enterSeries.append("rect").attr("class","serie serie"+(d+1)).each(function(e,t){h.call(this,e,t,d)});l.selectAll(".serie.serie"+o+" + .serie").remove(),this.outerSeries=l.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMulti.prototype.renderSeries.call(this)}}),module.exports=BarMulti;
function BarMulti(e,t){var i={xaxis:{type:"category",orient:"bottom"},groupLabel:null,yaxis:{}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMulti=DataV.extend(BarMulti,{data:function(e){if(!e)return this._data;var t=this.options,i=t.yaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),n=i.xaxis.key,a=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),u=t.getX(),o=_.maxBy(r,function(e){return e[a].length})[a].length,c=e.calGroupStep(i.groupLabel||r[0][a].length),h=function(e,r,o){var h=d3.select(this);i.withAnimated&&(i.isFirst&&h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(){return u(t.getMin())},width:function(){return c.rangeBand()},height:0}),h.transition().duration(i.animatedTiming).ease(i.animatedEasing)),e[a][o]!==t.getMin()&&void 0!==e[a][o]&&h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(e){return u(e[a][o])},width:function(){return c.rangeBand()},height:function(e){return u(t.getMin())-u(e[a][o])}})||h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(){return u(t.getMin())-1},width:function(){return c.rangeBand()},height:function(){return 1}})},l=this.series.selectAll(".series-group").data(this._data);this.enterSeries=l.enter().append("g").attr("class","series-group");for(var d=0;o>d;d++)l.each(function(e,t){var i=d3.select(this).select(".serie"+(d+1))[0][0];i&&h.call(d3.select(this).select(".serie"+(d+1))[0][0],e,t,d)}),this.enterSeries.append("rect").attr("class","serie serie"+(d+1)).each(function(e,t){h.call(this,e,t,d)});l.selectAll(".serie.serie"+o+" ~ .serie").remove(),this.outerSeries=l.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMulti.prototype.renderSeries.call(this)}}),module.exports=BarMulti;

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

function BarMultiCustom(t,e){var a={xaxis:{type:"category",orient:"bottom"},yaxis:{min:0}};_.deepMerge(a,e),DataV.call(this,t,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiCustom=DataV.extend(BarMultiCustom,{data:function(t){if(!t)return this._data;var e=this.options,a=e.yaxis.key;t.forEach(function(t){_.isArray(t[a])||(t[a]=[t[a]])}),this._data=t},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var t,e,a=this.options,i=this.data(),s=this,r=a.xaxis.key,n=a.yaxis.key;t=this.getComs("axis","xaxis"),e=this.getComs("axis","yaxis");var o=t.getX(),u=e.getX(),c=_.maxBy(i,function(t){return t[n].length})[n].length,l=t.calGroupStep(a.groupLabel||c),h=function(t,i,c){var h=d3.select(this);a.withAnimated&&(a.isFirst&&h.attr({d:function(t){var n=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(n=a.customPos.call(s,n,i,c),_.pos2Path(n)):"function"==typeof a.customPath?a.customPath.call(s,n,c):_.pos2Path(n)}}),h.transition().duration(a.animatedTiming).ease(a.animatedEasing)),t[n][c]!==e.getMin()&&void 0!==t[n][c]&&h.attr({d:function(t){var h=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(t[n][c])},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(t[n][c])},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(h=a.customPos.call(s,h,i,c),_.pos2Path(h)):"function"==typeof a.customPath?a.customPath.call(s,h,c):_.pos2Path(h)}})||h.attr({d:function(t){var n=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(e.getMin())-1},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())-1},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(n=a.customPos.call(s,n,i,c),_.pos2Path(n)):"function"==typeof a.customPath?a.customPath.call(s,n,c):_.pos2Path(n)}})},d=this.series.selectAll(".series-group").data(this._data);this.enterSeries=d.enter().append("g").attr("class","series-group");for(var g=0;c>g;g++)d.each(function(t,e){var a=d3.select(this).select(".serie"+(g+1))[0][0];a&&h.call(d3.select(this).select(".serie"+(g+1))[0][0],t,e,g)}),this.enterSeries.append("path").attr("class","serie serie"+(g+1)).each(function(t,e){h.call(this,t,e,g)});d.selectAll(".serie.serie"+c+" + .serie").remove(),this.outerSeries=d.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiCustom.prototype.renderSeries.call(this)}}),module.exports=BarMultiCustom;
function BarMultiCustom(t,e){var a={xaxis:{type:"category",orient:"bottom"},yaxis:{min:0}};_.deepMerge(a,e),DataV.call(this,t,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiCustom=DataV.extend(BarMultiCustom,{data:function(t){if(!t)return this._data;var e=this.options,a=e.yaxis.key;t.forEach(function(t){_.isArray(t[a])||(t[a]=[t[a]])}),this._data=t},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var t,e,a=this.options,i=this.data(),s=this,r=a.xaxis.key,n=a.yaxis.key;t=this.getComs("axis","xaxis"),e=this.getComs("axis","yaxis");var o=t.getX(),u=e.getX(),c=_.maxBy(i,function(t){return t[n].length})[n].length,l=t.calGroupStep(a.groupLabel||c),h=function(t,i,c){var h=d3.select(this);a.withAnimated&&(a.isFirst&&h.attr({d:function(t){var n=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(n=a.customPos.call(s,n,i,c),_.pos2Path(n)):"function"==typeof a.customPath?a.customPath.call(s,n,c):_.pos2Path(n)}}),h.transition().duration(a.animatedTiming).ease(a.animatedEasing)),t[n][c]!==e.getMin()&&void 0!==t[n][c]&&h.attr({d:function(t){var h=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(t[n][c])},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(t[n][c])},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(h=a.customPos.call(s,h,i,c),_.pos2Path(h)):"function"==typeof a.customPath?a.customPath.call(s,h,c):_.pos2Path(h)}})||h.attr({d:function(t){var n=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(e.getMin())-1},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())-1},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(n=a.customPos.call(s,n,i,c),_.pos2Path(n)):"function"==typeof a.customPath?a.customPath.call(s,n,c):_.pos2Path(n)}})},d=this.series.selectAll(".series-group").data(this._data);this.enterSeries=d.enter().append("g").attr("class","series-group");for(var g=0;c>g;g++)d.each(function(t,e){var a=d3.select(this).select(".serie"+(g+1))[0][0];a&&h.call(d3.select(this).select(".serie"+(g+1))[0][0],t,e,g)}),this.enterSeries.append("path").attr("class","serie serie"+(g+1)).each(function(t,e){h.call(this,t,e,g)});d.selectAll(".serie.serie"+c+" ~ .serie").remove(),this.outerSeries=d.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiCustom.prototype.renderSeries.call(this)}}),module.exports=BarMultiCustom;

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

function BarMultiHori(e,t){var i={xaxis:{orient:"bottom",key:"y"},yaxis:{type:"category",key:"x"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiHori=DataV.extend(BarMultiHori,{data:function(e){if(!e)return this._data;var t=this.options,i=t.xaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e.reverse()},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),n=i.xaxis.key,a=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),u=_.maxBy(r,function(e){return e[n].length})[n].length,c=((o.rangeBand()-(u-1)*i.padding)/u,t.calGroupStep(i.groupLabel||r[0][n].length)),d=function(t,r,u){var d=d3.select(this);i.withAnimated&&(i.isFirst&&d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:0,height:function(){return c.rangeBand()}}),d.transition().duration(i.animatedTiming).ease(i.animatedEasing)),t[n][u]!==e.getMin()&&void 0!==t[n][u]&&d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:function(e){return s(e[n][u])},height:function(){return c.rangeBand()}})||d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:function(){return s(e.getMin())+1},height:function(){return c.rangeBand()}})},h=this.series.selectAll(".series-group").data(this._data);this.enterSeries=h.enter().append("g").attr("class","series-group");for(var l=0;u>l;l++)h.each(function(e,t){var i=d3.select(this).select(".serie"+(l+1))[0][0];i&&d.call(d3.select(this).select(".serie"+(l+1))[0][0],e,t,l)}),this.enterSeries.append("rect").attr("class","serie serie"+(l+1)).each(function(e,t){d.call(this,e,t,l)});h.selectAll(".serie.serie"+u+" + .serie").remove(),this.outerSeries=h.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiHori.prototype.renderSeries.call(this)}}),module.exports=BarMultiHori;
function BarMultiHori(e,t){var i={xaxis:{orient:"bottom",key:"y"},yaxis:{type:"category",key:"x"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiHori=DataV.extend(BarMultiHori,{data:function(e){if(!e)return this._data;var t=this.options,i=t.xaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e.reverse()},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),n=i.xaxis.key,a=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),u=_.maxBy(r,function(e){return e[n].length})[n].length,c=((o.rangeBand()-(u-1)*i.padding)/u,t.calGroupStep(i.groupLabel||r[0][n].length)),d=function(t,r,u){var d=d3.select(this);i.withAnimated&&(i.isFirst&&d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:0,height:function(){return c.rangeBand()}}),d.transition().duration(i.animatedTiming).ease(i.animatedEasing)),t[n][u]!==e.getMin()&&void 0!==t[n][u]&&d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:function(e){return s(e[n][u])},height:function(){return c.rangeBand()}})||d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:function(){return s(e.getMin())+1},height:function(){return c.rangeBand()}})},h=this.series.selectAll(".series-group").data(this._data);this.enterSeries=h.enter().append("g").attr("class","series-group");for(var l=0;u>l;l++)h.each(function(e,t){var i=d3.select(this).select(".serie"+(l+1))[0][0];i&&d.call(d3.select(this).select(".serie"+(l+1))[0][0],e,t,l)}),this.enterSeries.append("rect").attr("class","serie serie"+(l+1)).each(function(e,t){d.call(this,e,t,l)});h.selectAll(".serie.serie"+u+" ~ .serie").remove(),this.outerSeries=h.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiHori.prototype.renderSeries.call(this)}}),module.exports=BarMultiHori;

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

function BarMatrix(t,e){var i={xaxis:{type:"category",orient:"bottom",padding:0},yaxis:{},matrixHeight:10};_.deepMerge(i,e),DataV.call(this,t,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMatrix=DataV.extend(BarMatrix,{data:function(t){if(!t)return this._data;var e=this.options,i=e.yaxis.key;t.forEach(function(t){_.isArray(t[i])||(t[i]=[t[i]])}),this._data=t},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var t,e,i=this.options,r=this.data();t=this.getComs("axis","xaxis"),e=this.getComs("axis","yaxis");var a=t.getX(),n=e.getX(),s=i.yaxis.key,o=i.xaxis.key,u=_.maxBy(r,function(t){return t[s].length})[s].length,c=r.length,h=function(u,h,d){var x=d3.select(this);i.withAnimated&&(i.isFirst&&x.attr({x:function(t){return a(t[o])},y:function(t){return n(t[s][h])},width:function(e){return"category"===i.xaxis.type?a.rangeBand():h+1>=c?a(t.getMax())-a(e[o]):a(r[h+1][o])-a(e[o])},height:0}),x.transition().duration(i.animatedTiming).ease(i.animatedEasing)),u[s][d]!==e.getMin()&&void 0!==u[s][d]&&x.attr({x:function(t){return a(t[o])},y:function(t){return n(t[s][d])},width:function(e){return"category"===i.xaxis.type?a.rangeBand():h+1>=c?a(t.getMax())-a(e[o]):a(r[h+1][o])-a(e[o])},height:function(){return i.matrixHeight}})||x.attr({x:function(t){return a(t[o])},y:function(){return n(e.getMin())},width:function(e){return"category"===i.xaxis.type?a.rangeBand():h+1>=c?a(t.getMax())-a(e[o]):a(r[h+1][o])-a(e[o])},height:function(){return i.matrixHeight}})},d=this.series.selectAll(".series-group").data(this._data);this.enterSeries=d.enter().append("g").attr("class","series-group");for(var x=0;u>x;x++)d.each(function(t,e){var i=d3.select(this).select(".serie"+(x+1))[0][0];i&&h.call(d3.select(this).select(".serie"+(x+1))[0][0],t,e,x)}),this.enterSeries.append("rect").attr("class","serie serie"+(x+1)).each(function(t,e){h.call(this,t,e,x)});d.selectAll(".serie.serie"+u+" + .serie").remove(),this.outerSeries=d.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMatrix.prototype.renderSeries.call(this)}}),module.exports=BarMatrix;
function BarMatrix(t,e){var i={xaxis:{type:"category",orient:"bottom",padding:0},yaxis:{},matrixHeight:10};_.deepMerge(i,e),DataV.call(this,t,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMatrix=DataV.extend(BarMatrix,{data:function(t){if(!t)return this._data;var e=this.options,i=e.yaxis.key;t.forEach(function(t){_.isArray(t[i])||(t[i]=[t[i]])}),this._data=t},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var t,e,i=this.options,r=this.data();t=this.getComs("axis","xaxis"),e=this.getComs("axis","yaxis");var a=t.getX(),n=e.getX(),s=i.yaxis.key,o=i.xaxis.key,u=_.maxBy(r,function(t){return t[s].length})[s].length,c=r.length,h=function(u,h,d){var x=d3.select(this);i.withAnimated&&(i.isFirst&&x.attr({x:function(t){return a(t[o])},y:function(t){return n(t[s][h])},width:function(e){return"category"===i.xaxis.type?a.rangeBand():h+1>=c?a(t.getMax())-a(e[o]):a(r[h+1][o])-a(e[o])},height:0}),x.transition().duration(i.animatedTiming).ease(i.animatedEasing)),u[s][d]!==e.getMin()&&void 0!==u[s][d]&&x.attr({x:function(t){return a(t[o])},y:function(t){return n(t[s][d])},width:function(e){return"category"===i.xaxis.type?a.rangeBand():h+1>=c?a(t.getMax())-a(e[o]):a(r[h+1][o])-a(e[o])},height:function(){return i.matrixHeight}})||x.attr({x:function(t){return a(t[o])},y:function(){return n(e.getMin())},width:function(e){return"category"===i.xaxis.type?a.rangeBand():h+1>=c?a(t.getMax())-a(e[o]):a(r[h+1][o])-a(e[o])},height:function(){return i.matrixHeight}})},d=this.series.selectAll(".series-group").data(this._data);this.enterSeries=d.enter().append("g").attr("class","series-group");for(var x=0;u>x;x++)d.each(function(t,e){var i=d3.select(this).select(".serie"+(x+1))[0][0];i&&h.call(d3.select(this).select(".serie"+(x+1))[0][0],t,e,x)}),this.enterSeries.append("rect").attr("class","serie serie"+(x+1)).each(function(t,e){h.call(this,t,e,x)});d.selectAll(".serie.serie"+u+" ~ .serie").remove(),this.outerSeries=d.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMatrix.prototype.renderSeries.call(this)}}),module.exports=BarMatrix;

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

function BarMulti(e,t){var i={xaxis:{type:"category",orient:"bottom"},groupLabel:null,yaxis:{}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMulti=DataV.extend(BarMulti,{data:function(e){if(!e)return this._data;var t=this.options,i=t.yaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),n=i.xaxis.key,a=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),u=t.getX(),o=_.maxBy(r,function(e){return e[a].length})[a].length,c=e.calGroupStep(i.groupLabel||r[0][a].length),h=function(e,r,o){var h=d3.select(this);i.withAnimated&&(i.isFirst&&h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(){return u(t.getMin())},width:function(){return c.rangeBand()},height:0}),h.transition().duration(i.animatedTiming).ease(i.animatedEasing)),e[a][o]!==t.getMin()&&void 0!==e[a][o]&&h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(e){return u(e[a][o])},width:function(){return c.rangeBand()},height:function(e){return u(t.getMin())-u(e[a][o])}})||h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(){return u(t.getMin())-1},width:function(){return c.rangeBand()},height:function(){return 1}})},l=this.series.selectAll(".series-group").data(this._data);this.enterSeries=l.enter().append("g").attr("class","series-group");for(var d=0;o>d;d++)l.each(function(e,t){var i=d3.select(this).select(".serie"+(d+1))[0][0];i&&h.call(d3.select(this).select(".serie"+(d+1))[0][0],e,t,d)}),this.enterSeries.append("rect").attr("class","serie serie"+(d+1)).each(function(e,t){h.call(this,e,t,d)});l.selectAll(".serie.serie"+o+" + .serie").remove(),this.outerSeries=l.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMulti.prototype.renderSeries.call(this)}}),module.exports=BarMulti;
function BarMulti(e,t){var i={xaxis:{type:"category",orient:"bottom"},groupLabel:null,yaxis:{}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMulti=DataV.extend(BarMulti,{data:function(e){if(!e)return this._data;var t=this.options,i=t.yaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),n=i.xaxis.key,a=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),u=t.getX(),o=_.maxBy(r,function(e){return e[a].length})[a].length,c=e.calGroupStep(i.groupLabel||r[0][a].length),h=function(e,r,o){var h=d3.select(this);i.withAnimated&&(i.isFirst&&h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(){return u(t.getMin())},width:function(){return c.rangeBand()},height:0}),h.transition().duration(i.animatedTiming).ease(i.animatedEasing)),e[a][o]!==t.getMin()&&void 0!==e[a][o]&&h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(e){return u(e[a][o])},width:function(){return c.rangeBand()},height:function(e){return u(t.getMin())-u(e[a][o])}})||h.attr({x:function(e){return s(e[n])+c(""+o)},y:function(){return u(t.getMin())-1},width:function(){return c.rangeBand()},height:function(){return 1}})},l=this.series.selectAll(".series-group").data(this._data);this.enterSeries=l.enter().append("g").attr("class","series-group");for(var d=0;o>d;d++)l.each(function(e,t){var i=d3.select(this).select(".serie"+(d+1))[0][0];i&&h.call(d3.select(this).select(".serie"+(d+1))[0][0],e,t,d)}),this.enterSeries.append("rect").attr("class","serie serie"+(d+1)).each(function(e,t){h.call(this,e,t,d)});l.selectAll(".serie.serie"+o+" ~ .serie").remove(),this.outerSeries=l.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMulti.prototype.renderSeries.call(this)}}),module.exports=BarMulti;

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

function BarMultiCustom(t,e){var a={xaxis:{type:"category",orient:"bottom"},yaxis:{}};_.deepMerge(a,e),DataV.call(this,t,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiCustom=DataV.extend(BarMultiCustom,{data:function(t){if(!t)return this._data;var e=this.options,a=e.yaxis.key;t.forEach(function(t){_.isArray(t[a])||(t[a]=[t[a]])}),this._data=t},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var t,e,a=this.options,i=this.data(),s=this,r=a.xaxis.key,n=a.yaxis.key;t=this.getComs("axis","xaxis"),e=this.getComs("axis","yaxis");var o=t.getX(),u=e.getX(),c=_.maxBy(i,function(t){return t[n].length})[n].length,l=t.calGroupStep(a.groupLabel||i[0][n].length),h=function(t,i,c){var h=d3.select(this);a.withAnimated&&(a.isFirst&&h.attr({d:function(t){var n=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(n=a.customPos.call(s,n,i,c),_.pos2Path(n)):"function"==typeof a.customPath?a.customPath.call(s,n,c):_.pos2Path(n)}}),h.transition().duration(a.animatedTiming).ease(a.animatedEasing)),t[n][c]!==e.getMin()&&void 0!==t[n][c]&&h.attr({d:function(t){var h=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(t[n][c])},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(t[n][c])},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(h=a.customPos.call(s,h,i,c),_.pos2Path(h)):"function"==typeof a.customPath?a.customPath.call(s,h,c):_.pos2Path(h)}})||h.attr({d:function(t){var n=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(e.getMin())-1},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())-1},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(n=a.customPos.call(s,n,i,c),_.pos2Path(n)):"function"==typeof a.customPath?a.customPath.call(s,n,c):_.pos2Path(n)}})},d=this.series.selectAll(".series-group").data(this._data);this.enterSeries=d.enter().append("g").attr("class","series-group");for(var g=0;c>g;g++)d.each(function(t,e){var a=d3.select(this).select(".serie"+(g+1))[0][0];a&&h.call(d3.select(this).select(".serie"+(g+1))[0][0],t,e,g)}),this.enterSeries.append("path").attr("class","serie serie"+(g+1)).each(function(t,e){h.call(this,t,e,g)});d.selectAll(".serie.serie"+c+" + .serie").remove(),this.outerSeries=d.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiCustom.prototype.renderSeries.call(this)}}),module.exports=BarMultiCustom;
function BarMultiCustom(t,e){var a={xaxis:{type:"category",orient:"bottom"},yaxis:{}};_.deepMerge(a,e),DataV.call(this,t,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiCustom=DataV.extend(BarMultiCustom,{data:function(t){if(!t)return this._data;var e=this.options,a=e.yaxis.key;t.forEach(function(t){_.isArray(t[a])||(t[a]=[t[a]])}),this._data=t},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var t,e,a=this.options,i=this.data(),s=this,r=a.xaxis.key,n=a.yaxis.key;t=this.getComs("axis","xaxis"),e=this.getComs("axis","yaxis");var o=t.getX(),u=e.getX(),c=_.maxBy(i,function(t){return t[n].length})[n].length,l=t.calGroupStep(a.groupLabel||i[0][n].length),h=function(t,i,c){var h=d3.select(this);a.withAnimated&&(a.isFirst&&h.attr({d:function(t){var n=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(n=a.customPos.call(s,n,i,c),_.pos2Path(n)):"function"==typeof a.customPath?a.customPath.call(s,n,c):_.pos2Path(n)}}),h.transition().duration(a.animatedTiming).ease(a.animatedEasing)),t[n][c]!==e.getMin()&&void 0!==t[n][c]&&h.attr({d:function(t){var h=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(t[n][c])},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(t[n][c])},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(h=a.customPos.call(s,h,i,c),_.pos2Path(h)):"function"==typeof a.customPath?a.customPath.call(s,h,c):_.pos2Path(h)}})||h.attr({d:function(t){var n=[{x:o(t[r])+l(""+c),y:u(e.getMin())},{x:o(t[r])+l(""+c),y:u(e.getMin())-1},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())-1},{x:o(t[r])+l(""+c)+l.rangeBand(),y:u(e.getMin())}];return"function"==typeof a.customPos?(n=a.customPos.call(s,n,i,c),_.pos2Path(n)):"function"==typeof a.customPath?a.customPath.call(s,n,c):_.pos2Path(n)}})},d=this.series.selectAll(".series-group").data(this._data);this.enterSeries=d.enter().append("g").attr("class","series-group");for(var g=0;c>g;g++)d.each(function(t,e){var a=d3.select(this).select(".serie"+(g+1))[0][0];a&&h.call(d3.select(this).select(".serie"+(g+1))[0][0],t,e,g)}),this.enterSeries.append("path").attr("class","serie serie"+(g+1)).each(function(t,e){h.call(this,t,e,g)});d.selectAll(".serie.serie"+c+" ~ .serie").remove(),this.outerSeries=d.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiCustom.prototype.renderSeries.call(this)}}),module.exports=BarMultiCustom;

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

function BarMultiHori(e,t){var i={xaxis:{orient:"bottom",key:"y"},yaxis:{type:"category",key:"x"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiHori=DataV.extend(BarMultiHori,{data:function(e){if(!e)return this._data;var t=this.options,i=t.xaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e.reverse()},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),n=i.xaxis.key,a=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),u=_.maxBy(r,function(e){return e[n].length})[n].length,c=((o.rangeBand()-(u-1)*i.padding)/u,t.calGroupStep(i.groupLabel||u)),d=function(t,r,u){var d=d3.select(this);i.withAnimated&&(i.isFirst&&d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:0,height:function(){return c.rangeBand()}}),d.transition().duration(i.animatedTiming).ease(i.animatedEasing)),t[n][u]!==e.getMin()&&void 0!==t[n][u]&&d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:function(e){return s(e[n][u])},height:function(){return c.rangeBand()}})||d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:function(){return s(e.getMin())+1},height:function(){return c.rangeBand()}})},h=this.series.selectAll(".series-group").data(this._data);this.enterSeries=h.enter().append("g").attr("class","series-group");for(var l=0;u>l;l++)h.each(function(e,t){var i=d3.select(this).select(".serie"+(l+1))[0][0];i&&d.call(d3.select(this).select(".serie"+(l+1))[0][0],e,t,l)}),this.enterSeries.append("rect").attr("class","serie serie"+(l+1)).each(function(e,t){d.call(this,e,t,l)});h.selectAll(".serie.serie"+u+" + .serie").remove(),this.outerSeries=h.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiHori.prototype.renderSeries.call(this)}}),module.exports=BarMultiHori;
function BarMultiHori(e,t){var i={xaxis:{orient:"bottom",key:"y"},yaxis:{type:"category",key:"x"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiHori=DataV.extend(BarMultiHori,{data:function(e){if(!e)return this._data;var t=this.options,i=t.xaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e.reverse()},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),n=i.xaxis.key,a=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),u=_.maxBy(r,function(e){return e[n].length})[n].length,c=((o.rangeBand()-(u-1)*i.padding)/u,t.calGroupStep(i.groupLabel||u)),d=function(t,r,u){var d=d3.select(this);i.withAnimated&&(i.isFirst&&d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:0,height:function(){return c.rangeBand()}}),d.transition().duration(i.animatedTiming).ease(i.animatedEasing)),t[n][u]!==e.getMin()&&void 0!==t[n][u]&&d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:function(e){return s(e[n][u])},height:function(){return c.rangeBand()}})||d.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[a])+c(""+u)},width:function(){return s(e.getMin())+1},height:function(){return c.rangeBand()}})},h=this.series.selectAll(".series-group").data(this._data);this.enterSeries=h.enter().append("g").attr("class","series-group");for(var l=0;u>l;l++)h.each(function(e,t){var i=d3.select(this).select(".serie"+(l+1))[0][0];i&&d.call(d3.select(this).select(".serie"+(l+1))[0][0],e,t,l)}),this.enterSeries.append("rect").attr("class","serie serie"+(l+1)).each(function(e,t){d.call(this,e,t,l)});h.selectAll(".serie.serie"+u+" ~ .serie").remove(),this.outerSeries=h.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiHori.prototype.renderSeries.call(this)}}),module.exports=BarMultiHori;

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

function BarMultiHoriColumn(e,t){var i={xaxis:{orient:"bottom",key:"y",min:0},yaxis:{type:"category",key:"x"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiHoriColumn=DataV.extend(BarMultiHoriColumn,{data:function(e){return e?void(this._data=e.reverse()):this._data},beforeRender:function(){DataV.prototype.beforeRender.call(this);var e=this.options,t=this.data(),i=e.xaxis.key,r=[];t.forEach(function(e){e.sum=0,r.push(_.sum(e[i]))});var a=_.maxBy(r);e.xaxis.max=Math.max(e.xaxis.max||0,a)},updateBeforeRender:function(){BarMultiHoriColumn.prototype.beforeRender.call(this)},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),a=i.xaxis.key,n=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),u=_.maxBy(r,function(e){return e[a].length})[a].length,l=function(t,r,u){var l=d3.select(this);i.withAnimated&&(i.isFirst&&l.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[n])},width:0,height:function(){return o.rangeBand()}}),l.transition().duration(i.animatedTiming).ease(i.animatedEasing)),l.attr({x:function(e){var t=e.sum||0;return e.sum=t+e[a][u],s(t)},y:function(e){return o(e[n])},width:function(e){return s(e[a][u])},height:function(){return o.rangeBand()}})},c=this.series.selectAll(".series-group").data(this._data);this.enterSeries=c.enter().append("g").attr("class","series-group");for(var h=0;u>h;h++)c.each(function(e,t){var i=d3.select(this).select(".serie"+(h+1))[0][0];i&&l.call(d3.select(this).select(".serie"+(h+1))[0][0],e,t,h)}),this.enterSeries.append("rect").attr("class","serie serie"+(h+1)).each(function(e,t){l.call(this,e,t,h)});c.selectAll(".serie.serie"+u+" + .serie").remove(),this.outerSeries=c.exit().remove()},updateSeries:function(){BarMultiHoriColumn.prototype.renderSeries.call(this)}}),module.exports=BarMultiHoriColumn;
function BarMultiHoriColumn(e,t){var i={xaxis:{orient:"bottom",key:"y",min:0},yaxis:{type:"category",key:"x"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiHoriColumn=DataV.extend(BarMultiHoriColumn,{data:function(e){return e?void(this._data=e.reverse()):this._data},beforeRender:function(){DataV.prototype.beforeRender.call(this);var e=this.options,t=this.data(),i=e.xaxis.key,r=[];t.forEach(function(e){e.sum=0,r.push(_.sum(e[i]))});var a=_.maxBy(r);e.xaxis.max=Math.max(e.xaxis.max||0,a)},updateBeforeRender:function(){BarMultiHoriColumn.prototype.beforeRender.call(this)},renderSeries:function(){this.svg.classed("bar-chart-g",!0);var e,t,i=this.options,r=this.data(),a=i.xaxis.key,n=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var s=e.getX(),o=t.getX(),u=_.maxBy(r,function(e){return e[a].length})[a].length,l=function(t,r,u){var l=d3.select(this);i.withAnimated&&(i.isFirst&&l.attr({x:function(){return s(e.getMin())},y:function(e){return o(e[n])},width:0,height:function(){return o.rangeBand()}}),l.transition().duration(i.animatedTiming).ease(i.animatedEasing)),l.attr({x:function(e){var t=e.sum||0;return e.sum=t+e[a][u],s(t)},y:function(e){return o(e[n])},width:function(e){return s(e[a][u])},height:function(){return o.rangeBand()}})},c=this.series.selectAll(".series-group").data(this._data);this.enterSeries=c.enter().append("g").attr("class","series-group");for(var h=0;u>h;h++)c.each(function(e,t){var i=d3.select(this).select(".serie"+(h+1))[0][0];i&&l.call(d3.select(this).select(".serie"+(h+1))[0][0],e,t,h)}),this.enterSeries.append("rect").attr("class","serie serie"+(h+1)).each(function(e,t){l.call(this,e,t,h)});c.selectAll(".serie.serie"+u+" ~ .serie").remove(),this.outerSeries=c.exit().remove()},updateSeries:function(){BarMultiHoriColumn.prototype.renderSeries.call(this)}}),module.exports=BarMultiHoriColumn;

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

function BarMultiVerti(e,t){var r={xaxis:{type:"category",orient:"bottom"},groupLabel:null,yaxis:{min:0}};_.deepMerge(r,t),DataV.call(this,e,r)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiVerti=DataV.extend(BarMultiVerti,{beforeRender:function(){DataV.prototype.beforeRender.call(this);var e=this.options,t=this.data(),r=e.yaxis.key,i=[];t.forEach(function(e){e.sum=0,i.push(_.sum(e[r]))});var a=_.maxBy(i);e.yaxis.max=Math.max(e.yaxis.max||0,a)},updateBeforeRender:function(){BarMultiVerti.prototype.beforeRender.call(this)},renderSeries:function(){var e=this.options,t=this.data(),r=e.xaxis.key,i=e.yaxis.key;this.svg.classed("bar-chart-g",!0);var a,s;a=this.getComs("axis","xaxis"),s=this.getComs("axis","yaxis");var n=a.getX(),o=s.getX(),u=_.maxBy(t,function(e){return e[i].length})[i].length,c=function(t,a,u){var c=d3.select(this);e.withAnimated&&(e.isFirst&&c.attr({x:function(e){return n(e[r])},y:function(){return o(s.getMin())},width:function(){return n.rangeBand()},height:0}),c.transition().duration(e.animatedTiming).ease(e.animatedEasing)),c.attr({x:function(e){return n(e[r])},y:function(e){var t=e.sum||0;return e.sum=t+e[i][u],o(e.sum)},width:function(){return n.rangeBand()},height:function(e){return o(s.getMin())-o(e[i][u])}})},l=this.series.selectAll(".series-group").data(this._data);this.enterSeries=l.enter().append("g").attr("class","series-group");for(var h=0;u>h;h++)l.each(function(e,t){var r=d3.select(this).select(".serie"+(h+1))[0][0];r&&c.call(d3.select(this).select(".serie"+(h+1))[0][0],e,t,h)}),this.enterSeries.append("rect").attr("class","serie serie"+(h+1)).each(function(e,t){c.call(this,e,t,h)});l.selectAll(".serie.serie"+u+" + .serie").remove(),this.outerSeries=l.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiVerti.prototype.renderSeries.call(this)}}),module.exports=BarMultiVerti;
function BarMultiVerti(e,t){var r={xaxis:{type:"category",orient:"bottom"},groupLabel:null,yaxis:{min:0}};_.deepMerge(r,t),DataV.call(this,e,r)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");BarMultiVerti=DataV.extend(BarMultiVerti,{beforeRender:function(){DataV.prototype.beforeRender.call(this);var e=this.options,t=this.data(),r=e.yaxis.key,i=[];t.forEach(function(e){e.sum=0,i.push(_.sum(e[r]))});var a=_.maxBy(i);e.yaxis.max=Math.max(e.yaxis.max||0,a)},updateBeforeRender:function(){BarMultiVerti.prototype.beforeRender.call(this)},renderSeries:function(){var e=this.options,t=this.data(),r=e.xaxis.key,i=e.yaxis.key;this.svg.classed("bar-chart-g",!0);var a,s;a=this.getComs("axis","xaxis"),s=this.getComs("axis","yaxis");var n=a.getX(),o=s.getX(),u=_.maxBy(t,function(e){return e[i].length})[i].length,c=function(t,a,u){var c=d3.select(this);e.withAnimated&&(e.isFirst&&c.attr({x:function(e){return n(e[r])},y:function(){return o(s.getMin())},width:function(){return n.rangeBand()},height:0}),c.transition().duration(e.animatedTiming).ease(e.animatedEasing)),c.attr({x:function(e){return n(e[r])},y:function(e){var t=e.sum||0;return e.sum=t+e[i][u],o(e.sum)},width:function(){return n.rangeBand()},height:function(e){return o(s.getMin())-o(e[i][u])}})},l=this.series.selectAll(".series-group").data(this._data);this.enterSeries=l.enter().append("g").attr("class","series-group");for(var h=0;u>h;h++)l.each(function(e,t){var r=d3.select(this).select(".serie"+(h+1))[0][0];r&&c.call(d3.select(this).select(".serie"+(h+1))[0][0],e,t,h)}),this.enterSeries.append("rect").attr("class","serie serie"+(h+1)).each(function(e,t){c.call(this,e,t,h)});l.selectAll(".serie.serie"+u+" ~ .serie").remove(),this.outerSeries=l.exit().remove()},updateBeforeRender:function(){this.beforeRender()},updateSeries:function(){BarMultiVerti.prototype.renderSeries.call(this)}}),module.exports=BarMultiVerti;

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

function Legend(e,t,n){this.reset(),this.options={type:"horizontal",renderType:"defaults"},this.init(e,t,n),this._valid()}var _=require("../util"),Com=require("./index"),d3=require("d3");Legend=Com.extend(Legend,{_valid:function(){var e=this.options,t=["horizontal","vertical"];-1===_.indexOf(t,e.type.toLowerCase())&&(this.msg="legend arguments error. there is no "+e.type+" in types.",e.type=t[0],this.valid=!1),e.type=_.initialUpperCase(e.type);var n=["defaults"];-1===_.indexOf(n,e.renderType.toLowerCase())&&(this.msg="legend arguments error. there is no "+e.renderType+" in types.",e.renderType=n[0],this.valid=!1),e.renderType=_.initialUpperCase(e.renderType)},renderSeries:function(){var e=this.options,t=this.alloptions,n=t.beforeLayout.legend,i=e.margin||t.margin,r=_.extend(_.omit(n,"position"),{margin:i.top+"px "+i.right+"px "+i.bottom+"px "+i.left+"px"});return this.el=this.el.append("div").attr({"class":"legend"}).style(r),this.svg=this.el.append("svg").attr({width:n.width,height:n.height}).append("g"),this["cal"+e.type](),this},calHorizontal:function(){for(var e=this.options,t=this.alloptions,n=this.data(),i=t.yaxis.key,r=Math.max(e.legendLabels.length,_.maxBy(n,function(e){return e[i].length})[i].length),s=t.beforeLayout.legend,a=s.width/r,l=this,d=0;r>d;d++){var o=e.legendLabels[d]||"legend"+(d+1),h={x:d*a,y:0,width:a,height:s.height},g=l.svg.select(".legend"+(d+1))[0][0]?l.svg.select(".legend"+(d+1)):l.svg.append("g").attr({"class":"legend-label legend"+(d+1)});"function"==typeof e.customRender?e.customRender.call(g,o,h,d):this["render"+e.renderType](g,o,h,d)}},calVertical:function(){for(var e=this.options,t=this.alloptions,n=t.yaxis.key,i=Math.max(e.legendLabels.length,_.maxBy(data,function(e){return e[n].length})[n].length),r=e.beforeLayout.legend,s=r.height/i,a=this,l=0;i>l;l++){var d=e.legendLabels[l]||"legend"+(l+1),o={x:0,y:l*s,width:r.width,height:s},h=a.svg.select(".legend"+(l+1))[0][0]?a.svg.select(".legend"+(l+1)):a.svg.append("g").attr({"class":"legend-label legend"+(l+1)});"function"==typeof e.customRender?e.customRender.call(h,d,o,l):this["render"+e.renderType](h,d,o,l)}},renderDefaults:function(e,t,n){e.attr({transform:"translate("+(n.x+n.width/2)+", "+(n.y+n.height/2)+")"}),e.append("text").html(t).attr({x:30,y:5,dy:".35em"})},updateSeries:function(){return this["cal"+this.options.type](),this}}),module.exports=Legend;
function Legend(e,t,n){this.reset(),this.options={type:"horizontal",renderType:"defaults"},this.init(e,t,n),this._valid()}var _=require("../util"),Com=require("./index"),d3=require("d3");Legend=Com.extend(Legend,{_valid:function(){var e=this.options,t=["horizontal","vertical"];-1===_.indexOf(t,e.type.toLowerCase())&&(this.msg="legend arguments error. there is no "+e.type+" in types.",e.type=t[0],this.valid=!1),e.type=_.initialUpperCase(e.type);var n=["defaults"];-1===_.indexOf(n,e.renderType.toLowerCase())&&(this.msg="legend arguments error. there is no "+e.renderType+" in types.",e.renderType=n[0],this.valid=!1),e.renderType=_.initialUpperCase(e.renderType)},renderSeries:function(){var e=this.options,t=this.alloptions,n=t.beforeLayout.legend,i=e.margin||t.margin,l=_.extend(_.omit(n,"position"),{margin:i.top+"px "+i.right+"px "+i.bottom+"px "+i.left+"px"});return this.el=this.el.append("div").attr({"class":"legend"}).style(l),this.svg=this.el.append("svg").attr({width:n.width,height:n.height}).append("g"),this["cal"+e.type](),this},calHorizontal:function(){for(var e=this.options,t=this.alloptions,n=this.data(),i=t.yaxis.key,l=Math.max(e.legendLabels.length,_.maxBy(n,function(e){return e[i].length})[i].length),s=t.beforeLayout.legend,r=s.width/l,a=this,d=0;l>d;d++){var o=e.legendLabels[d]||"legend"+(d+1),h={x:d*r,y:0,width:r,height:s.height},g=a.svg.select(".legend"+(d+1))[0][0]?a.svg.select(".legend"+(d+1)):a.svg.append("g").attr({"class":"legend-label legend"+(d+1)});"function"==typeof e.customRender?e.customRender.call(g,o,h,d):this["render"+e.renderType](g,o,h,d)}this.svg.selectAll(".legend-label.legend"+l+" ~ .legend-label").remove()},calVertical:function(){for(var e=this.options,t=this.alloptions,n=t.yaxis.key,i=Math.max(e.legendLabels.length,_.maxBy(data,function(e){return e[n].length})[n].length),l=e.beforeLayout.legend,s=l.height/i,r=this,a=0;i>a;a++){var d=e.legendLabels[a]||"legend"+(a+1),o={x:0,y:a*s,width:l.width,height:s},h=r.svg.select(".legend"+(a+1))[0][0]?r.svg.select(".legend"+(a+1)):r.svg.append("g").attr({"class":"legend-label legend"+(a+1)});"function"==typeof e.customRender?e.customRender.call(h,d,o,a):this["render"+e.renderType](h,d,o,a)}this.svg.selectAll(".legend-label.legend"+i+" ~ .legend-label").remove()},renderDefaults:function(e,t,n){e.attr({transform:"translate("+(n.x+n.width/2)+", "+(n.y+n.height/2)+")"}),e.append("text").html(t).attr({x:30,y:5,dy:".35em"})},updateSeries:function(){return this["cal"+this.options.type](),this}}),module.exports=Legend;

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

function LineMulti(e,t){var i={xaxis:{orient:"bottom"},yaxis:{key:"y"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");LineMulti=DataV.extend(LineMulti,{data:function(e){if(!e)return this._data;var t=this.options,i=t.yaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e},renderSeries:function(){this.svg.classed("line-chart-g",!0);var e,t,i=this.options,a=this.data(),s=i.xaxis.key,r=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var n=e.getX(),o=t.getX(),d=_.maxBy(a,function(e){return e[r].length})[r].length;this.series=this.series.datum(a).each(function(){for(var e=d3.select(this),t=0;d>t;t++){var a=d3.svg.line().x(function(e){return"time"===i.xaxis.type&&"string"==typeof e[s]?n(new Date(e[s]))+(n.rangeBand?n.rangeBand()/2:0):n(e[s])+("category"===i.xaxis.type?n.rangeBand()/2:0)}).y(function(e){return o(e[r][t]||yaxis.getMax())});i.interpolate&&a.interpolate(i.interpolate);var l=e.select(".serie"+(t+1))[0][0]?e.select(".serie"+(t+1)):e.append("path").attr({"class":"serie serie"+(t+1)});i.withAnimated&&l.transition().duration(i.animatedTiming).ease(i.animatedEasing),l.attr({d:a})}}),this.series.selectAll(".serie.serie"+d+" + .serie").remove()},updateSeries:function(){LineMulti.prototype.renderSeries.call(this)}}),module.exports=LineMulti;
function LineMulti(e,t){var i={xaxis:{orient:"bottom"},yaxis:{key:"y"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");LineMulti=DataV.extend(LineMulti,{data:function(e){if(!e)return this._data;var t=this.options,i=t.yaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e},renderSeries:function(){this.svg.classed("line-chart-g",!0);var e,t,i=this.options,a=this.data(),s=i.xaxis.key,r=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var n=e.getX(),o=t.getX(),d=_.maxBy(a,function(e){return e[r].length})[r].length;this.series=this.series.datum(a).each(function(){for(var e=d3.select(this),t=0;d>t;t++){var a=d3.svg.line().x(function(e){return"time"===i.xaxis.type&&"string"==typeof e[s]?n(new Date(e[s]))+(n.rangeBand?n.rangeBand()/2:0):n(e[s])+("category"===i.xaxis.type?n.rangeBand()/2:0)}).y(function(e){return o(e[r][t]||yaxis.getMax())});i.interpolate&&a.interpolate(i.interpolate);var l=e.select(".serie"+(t+1))[0][0]?e.select(".serie"+(t+1)):e.append("path").attr({"class":"serie serie"+(t+1)});i.withAnimated&&l.transition().duration(i.animatedTiming).ease(i.animatedEasing),l.attr({d:a})}}),this.series.selectAll(".serie.serie"+d+" ~ .serie").remove()},updateSeries:function(){LineMulti.prototype.renderSeries.call(this)}}),module.exports=LineMulti;

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

function LineMulti(e,t){var i={xaxis:{orient:"bottom"},yaxis:{key:"y"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");LineMulti=DataV.extend(LineMulti,{data:function(e){if(!e)return this._data;var t=this.options,i=t.yaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e},renderSeries:function(){this.svg.classed("line-chart-g",!0);var e,t,i=this.options,a=this.data(),s=i.xaxis.key,r=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var n=e.getX(),o=t.getX(),d=_.maxBy(a,function(e){return e[r].length})[r].length;this.series=this.series.datum(a).each(function(){for(var e=d3.select(this),t=0;d>t;t++){var a=d3.svg.line().x(function(e){return"time"===i.xaxis.type&&"string"==typeof e[s]?n(new Date(e[s]))+(n.rangeBand?n.rangeBand()/2:0):n(e[s])+("category"===i.xaxis.type?n.rangeBand()/2:0)}).y(function(e){return o(e[r][t]||yaxis.getMax())});i.interpolate&&a.interpolate(i.interpolate);var l=e.select(".serie"+(t+1))[0][0]?e.select(".serie"+(t+1)):e.append("path").attr({"class":"serie serie"+(t+1)});i.withAnimated&&l.transition().duration(i.animatedTiming).ease(i.animatedEasing),l.attr({d:a})}}),this.series.selectAll(".serie.serie"+d+" + .serie").remove()},updateSeries:function(){LineMulti.prototype.renderSeries.call(this)}}),module.exports=LineMulti;
function LineMulti(e,t){var i={xaxis:{orient:"bottom"},yaxis:{key:"y"}};_.deepMerge(i,t),DataV.call(this,e,i)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");LineMulti=DataV.extend(LineMulti,{data:function(e){if(!e)return this._data;var t=this.options,i=t.yaxis.key;e.forEach(function(e){_.isArray(e[i])||(e[i]=[e[i]])}),this._data=e},renderSeries:function(){this.svg.classed("line-chart-g",!0);var e,t,i=this.options,a=this.data(),s=i.xaxis.key,r=i.yaxis.key;e=this.getComs("axis","xaxis"),t=this.getComs("axis","yaxis");var n=e.getX(),o=t.getX(),d=_.maxBy(a,function(e){return e[r].length})[r].length;this.series=this.series.datum(a).each(function(){for(var e=d3.select(this),t=0;d>t;t++){var a=d3.svg.line().x(function(e){return"time"===i.xaxis.type&&"string"==typeof e[s]?n(new Date(e[s]))+(n.rangeBand?n.rangeBand()/2:0):n(e[s])+("category"===i.xaxis.type?n.rangeBand()/2:0)}).y(function(e){return o(e[r][t]||yaxis.getMax())});i.interpolate&&a.interpolate(i.interpolate);var l=e.select(".serie"+(t+1))[0][0]?e.select(".serie"+(t+1)):e.append("path").attr({"class":"serie serie"+(t+1)});i.withAnimated&&l.transition().duration(i.animatedTiming).ease(i.animatedEasing),l.attr({d:a})}}),this.series.selectAll(".serie.serie"+d+" ~ .serie").remove()},updateSeries:function(){LineMulti.prototype.renderSeries.call(this)}}),module.exports=LineMulti;
{
"name": "dchart-core",
"version": "1.1.12",
"version": "1.1.13",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

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