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

victory-chart

Package Overview
Dependencies
Maintainers
8
Versions
290
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-chart - npm Package Compare versions

Comparing version 18.1.2 to 18.1.3

5

CHANGELOG.md
# VictoryChart Changelog
## 18.1.3 (2017-03-15)
- Removes unnecessary props from group components
- Fixes a bug with domainPadding in grouped bar charts
## 18.1.2 (2017-03-14)

@@ -4,0 +9,0 @@

8

lib/components/victory-area/victory-area.js

@@ -141,7 +141,7 @@ Object.defineProperty(exports,"__esModule",{value:true});var _without2=require("lodash/without");var _without3=_interopRequireDefault(_without2);var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();

var children=[_react2.default.cloneElement(dataComponent,dataProps)].concat(_toConsumableArray(labelComponents));
return this.renderContainer(groupComponent,props,children);
return this.renderContainer(groupComponent,children,{});
}},{key:"renderContainer",value:function renderContainer(
component,props,children){
var parentProps=this.getComponentProps(component,"parent","parent");
component,children,props){
var parentProps=props||this.getComponentProps(component,"parent","parent");
return _react2.default.cloneElement(component,parentProps,children);

@@ -166,3 +166,3 @@ }},{key:"shouldAnimate",value:function shouldAnimate()

var children=this.renderData(props);
return this.renderContainer(props.containerComponent,props,children);
return this.renderContainer(props.containerComponent,children);
}}]);return VictoryArea;}(_react2.default.Component);VictoryArea.propTypes={animate:_react.PropTypes.object,categories:_react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.string),_react.PropTypes.shape({x:_react.PropTypes.arrayOf(_react.PropTypes.string),y:_react.PropTypes.arrayOf(_react.PropTypes.string)})]),containerComponent:_react.PropTypes.element,data:_react.PropTypes.array,domainPadding:_react.PropTypes.oneOfType([_react.PropTypes.shape({x:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain]),y:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain])}),_react.PropTypes.number]),dataComponent:_react.PropTypes.element,domain:_react.PropTypes.oneOfType([_victoryCore.PropTypes.domain,_react.PropTypes.shape({x:_victoryCore.PropTypes.domain,y:_victoryCore.PropTypes.domain})]),events:_react.PropTypes.arrayOf(_react.PropTypes.shape({target:_react.PropTypes.oneOf(["data","labels","parent"]),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.array,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),eventHandlers:_react.PropTypes.object})),groupComponent:_react.PropTypes.element,height:_victoryCore.PropTypes.nonNegative,interpolation:_react.PropTypes.oneOf(["basis","bundle","cardinal","catmullRom","linear","monotoneX","monotoneY","natural","radial","step","stepAfter","stepBefore"]),Label:_victoryCore.PropTypes.deprecated(_react.PropTypes.string,"Use `labels` instead for individual data labels"),labels:_react.PropTypes.oneOfType([_react.PropTypes.func,_react.PropTypes.array]),labelComponent:_react.PropTypes.element,name:_react.PropTypes.string,padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),samples:_victoryCore.PropTypes.nonNegative,scale:_react.PropTypes.oneOfType([_victoryCore.PropTypes.scale,_react.PropTypes.shape({x:_victoryCore.PropTypes.scale,y:_victoryCore.PropTypes.scale})]),sharedEvents:_react.PropTypes.shape({events:_react.PropTypes.array,getEventState:_react.PropTypes.func}),sortKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),standalone:_react.PropTypes.bool,style:_react.PropTypes.shape({parent:_react.PropTypes.object,data:_react.PropTypes.object,labels:_react.PropTypes.object}),theme:_react.PropTypes.object,width:_victoryCore.PropTypes.nonNegative,x:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),y:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)])};VictoryArea.defaultProps={dataComponent:_react2.default.createElement(_victoryCore.Area,null),labelComponent:_react2.default.createElement(_victoryCore.VictoryLabel,null),scale:"linear",samples:50,standalone:true,containerComponent:_react2.default.createElement(_victoryCore.VictoryContainer,null),groupComponent:_react2.default.createElement(_victoryCore.VictoryClipContainer,null),theme:_victoryCore.VictoryTheme.grayscale};VictoryArea.displayName="VictoryArea";VictoryArea.role="area";VictoryArea.continuous=true;VictoryArea.defaultTransitions=_victoryCore.DefaultTransitions.continuousTransitions();VictoryArea.getDomain=_victoryCore.Domain.getDomainWithZero.bind(_victoryCore.Domain);VictoryArea.getData=_victoryCore.Data.getData.bind(_victoryCore.Data);VictoryArea.getBaseProps=(0,_partialRight3.default)(_helperMethods2.default.getBaseProps.bind(_helperMethods2.default),fallbackProps);VictoryArea.expectedComponents=["dataComponent","labelComponent","groupComponent","containerComponent"];exports.default=

@@ -169,0 +169,0 @@

@@ -189,4 +189,4 @@ Object.defineProperty(exports,"__esModule",{value:true});var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _assign2=require("lodash/assign");var _assign3=_interopRequireDefault(_assign2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require("react");var _react2=_interopRequireDefault(_react);

component,props,children){
var parentProps=this.getComponentProps(component,"parent","parent");
component,children,props){
var parentProps=props||this.getComponentProps(component,"parent","parent");
return _react2.default.cloneElement(component,parentProps,children);

@@ -218,3 +218,3 @@ }},{key:"shouldAnimate",value:function shouldAnimate()

return this.renderContainer(props.containerComponent,props,children);
return this.renderContainer(props.containerComponent,children);
}}]);return VictoryAxis;}(_react2.default.Component);VictoryAxis.displayName="VictoryAxis";VictoryAxis.role="axis";VictoryAxis.defaultTransitions={onExit:{duration:500},onEnter:{duration:500}};VictoryAxis.propTypes={animate:_react.PropTypes.object,axisComponent:_react.PropTypes.element,axisLabelComponent:_react.PropTypes.element,containerComponent:_react.PropTypes.element,crossAxis:_react.PropTypes.bool,dependentAxis:_react.PropTypes.bool,domain:_react.PropTypes.oneOfType([_victoryCore.PropTypes.domain,_react.PropTypes.shape({x:_victoryCore.PropTypes.domain,y:_victoryCore.PropTypes.domain})]),domainPadding:_react.PropTypes.oneOfType([_react.PropTypes.shape({x:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain]),y:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain])}),_react.PropTypes.number]),events:_react.PropTypes.arrayOf(_react.PropTypes.shape({target:_react.PropTypes.oneOf(["axis","axisLabel","grid","ticks","tickLabels","parent"]),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.array,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),eventHandlers:_react.PropTypes.object})),fixLabelOverlap:_react.PropTypes.bool,gridComponent:_react.PropTypes.element,groupComponent:_react.PropTypes.element,height:_victoryCore.PropTypes.nonNegative,label:_react.PropTypes.any,name:_react.PropTypes.string,offsetX:_react.PropTypes.number,offsetY:_react.PropTypes.number,orientation:_react.PropTypes.oneOf(["top","bottom","left","right"]),padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),scale:_react.PropTypes.oneOfType([_victoryCore.PropTypes.scale,_react.PropTypes.shape({x:_victoryCore.PropTypes.scale,y:_victoryCore.PropTypes.scale})]),sharedEvents:_react.PropTypes.shape({events:_react.PropTypes.array,getEventState:_react.PropTypes.func}),standalone:_react.PropTypes.bool,style:_react.PropTypes.shape({parent:_react.PropTypes.object,axis:_react.PropTypes.object,axisLabel:_react.PropTypes.object,grid:_react.PropTypes.object,ticks:_react.PropTypes.object,tickLabels:_react.PropTypes.object}),theme:_react.PropTypes.object,tickComponent:_react.PropTypes.element,tickCount:_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.greaterThanZero]),tickFormat:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.homogeneousArray]),tickLabelComponent:_react.PropTypes.element,tickValues:_victoryCore.PropTypes.homogeneousArray,width:_victoryCore.PropTypes.nonNegative};VictoryAxis.defaultProps={axisComponent:_react2.default.createElement(_victoryCore.Line,{type:"axis"}),axisLabelComponent:_react2.default.createElement(_victoryCore.VictoryLabel,null),tickLabelComponent:_react2.default.createElement(_victoryCore.VictoryLabel,null),tickComponent:_react2.default.createElement(_victoryCore.Line,{type:"tick"}),gridComponent:_react2.default.createElement(_victoryCore.Line,{type:"grid"}),scale:"linear",standalone:true,theme:_victoryCore.VictoryTheme.grayscale,tickCount:5,containerComponent:_react2.default.createElement(_victoryCore.VictoryContainer,null),groupComponent:_react2.default.createElement("g",{role:"presentation"}),fixLabelOverlap:false};VictoryAxis.getDomain=_helperMethods2.default.getDomain.bind(_helperMethods2.default);VictoryAxis.getAxis=_axis2.default.getAxis.bind(_axis2.default);VictoryAxis.getScale=_helperMethods2.default.getScale.bind(_helperMethods2.default);VictoryAxis.getStyles=(0,_partialRight3.default)(_helperMethods2.default.getStyles.bind(_helperMethods2.default),fallbackProps.style);VictoryAxis.getBaseProps=(0,_partialRight3.default)(_helperMethods2.default.getBaseProps.bind(_helperMethods2.default),fallbackProps);VictoryAxis.expectedComponents=["axisComponent","axisLabelComponent","groupComponent","containerComponent","tickComponent","tickLabelComponent","gridComponent"];exports.default=

@@ -221,0 +221,0 @@

@@ -164,3 +164,3 @@ Object.defineProperty(exports,"__esModule",{value:true});var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require("react");var _react2=_interopRequireDefault(_react);

var children=[].concat(_toConsumableArray(dataComponents),_toConsumableArray(labelComponents));
return this.renderContainer(groupComponent,props,children);
return this.renderContainer(groupComponent,children,{});

@@ -173,4 +173,4 @@ }},{key:"shouldAnimate",value:function shouldAnimate()

component,props,children){
var parentProps=this.getComponentProps(component,"parent","parent");
component,children,props){
var parentProps=props||this.getComponentProps(component,"parent","parent");
return _react2.default.cloneElement(component,parentProps,children);

@@ -190,3 +190,3 @@ }},{key:"render",value:function render()

var children=this.renderData(props);
return this.renderContainer(props.containerComponent,props,children);
return this.renderContainer(props.containerComponent,children);
}}]);return VictoryBar;}(_react2.default.Component);VictoryBar.displayName="VictoryBar";VictoryBar.role="bar";VictoryBar.defaultTransitions={onLoad:{duration:2000,before:function before(){return{_y:0,_y1:0,_y0:0};},after:function after(datum){return{_y:datum._y,_y1:datum._y1,_y0:datum._y0};}},onExit:{duration:500,before:function before(){return{_y:0,yOffset:0};}},onEnter:{duration:500,before:function before(){return{_y:0,_y1:0,_y0:0};},after:function after(datum){return{_y:datum._y,_y1:datum._y1,_y0:datum._y0};}}};VictoryBar.propTypes={animate:_react.PropTypes.object,categories:_react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.string),_react.PropTypes.shape({x:_react.PropTypes.arrayOf(_react.PropTypes.string),y:_react.PropTypes.arrayOf(_react.PropTypes.string)})]),containerComponent:_react.PropTypes.element,data:_react.PropTypes.array,domainPadding:_react.PropTypes.oneOfType([_react.PropTypes.shape({x:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain]),y:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain])}),_react.PropTypes.number]),dataComponent:_react.PropTypes.element,domain:_react.PropTypes.oneOfType([_victoryCore.PropTypes.domain,_react.PropTypes.shape({x:_victoryCore.PropTypes.domain,y:_victoryCore.PropTypes.domain})]),events:_react.PropTypes.arrayOf(_react.PropTypes.shape({target:_react.PropTypes.oneOf(["data","labels","parent"]),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.array,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),eventHandlers:_react.PropTypes.object})),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),groupComponent:_react.PropTypes.element,height:_victoryCore.PropTypes.nonNegative,horizontal:_react.PropTypes.bool,labels:_react.PropTypes.oneOfType([_react.PropTypes.func,_react.PropTypes.array]),labelComponent:_react.PropTypes.element,name:_react.PropTypes.string,padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),samples:_victoryCore.PropTypes.nonNegative,scale:_react.PropTypes.oneOfType([_victoryCore.PropTypes.scale,_react.PropTypes.shape({x:_victoryCore.PropTypes.scale,y:_victoryCore.PropTypes.scale})]),sharedEvents:_react.PropTypes.shape({events:_react.PropTypes.array,getEventState:_react.PropTypes.func}),sortKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),standalone:_react.PropTypes.bool,style:_react.PropTypes.shape({parent:_react.PropTypes.object,data:_react.PropTypes.object,labels:_react.PropTypes.object}),theme:_react.PropTypes.object,width:_victoryCore.PropTypes.nonNegative,x:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),y:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)])};VictoryBar.defaultProps={data:defaultData,dataComponent:_react2.default.createElement(_victoryCore.Bar,null),labelComponent:_react2.default.createElement(_victoryCore.VictoryLabel,null),scale:"linear",standalone:true,containerComponent:_react2.default.createElement(_victoryCore.VictoryContainer,null),groupComponent:_react2.default.createElement("g",{role:"presentation"}),theme:_victoryCore.VictoryTheme.grayscale};VictoryBar.getDomain=_victoryCore.Domain.getDomainWithZero.bind(_victoryCore.Domain);VictoryBar.getData=_victoryCore.Data.getData.bind(_victoryCore.Data);VictoryBar.getBaseProps=(0,_partialRight3.default)(_helperMethods2.default.getBaseProps.bind(_helperMethods2.default),fallbackProps);VictoryBar.expectedComponents=["dataComponent","labelComponent","groupComponent","containerComponent"];exports.default=

@@ -193,0 +193,0 @@

@@ -182,3 +182,3 @@ Object.defineProperty(exports,"__esModule",{value:true});var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require("react");var _react2=_interopRequireDefault(_react);

var children=[].concat(_toConsumableArray(dataComponents),_toConsumableArray(labelComponents));
return this.renderContainer(groupComponent,props,children);
return this.renderContainer(groupComponent,children,{});
}},{key:"shouldAnimate",value:function shouldAnimate()

@@ -190,4 +190,4 @@

component,props,children){
var parentProps=this.getComponentProps(component,"parent","parent");
component,children,props){
var parentProps=props||this.getComponentProps(component,"parent","parent");
return _react2.default.cloneElement(component,parentProps,children);

@@ -207,3 +207,3 @@ }},{key:"render",value:function render()

var children=this.renderData(props);
return this.renderContainer(props.containerComponent,props,children);
return this.renderContainer(props.containerComponent,children);
}}]);return VictoryCandlestick;}(_react2.default.Component);VictoryCandlestick.displayName="VictoryCandlestick";VictoryCandlestick.role="candlestick";VictoryCandlestick.defaultTransitions=_victoryCore.DefaultTransitions.discreteTransitions();VictoryCandlestick.propTypes={animate:_react.PropTypes.object,candleColors:_react.PropTypes.shape({positive:_react.PropTypes.string,negative:_react.PropTypes.string}),categories:_react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.string),_react.PropTypes.shape({x:_react.PropTypes.arrayOf(_react.PropTypes.string),y:_react.PropTypes.arrayOf(_react.PropTypes.string)})]),close:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),containerComponent:_react.PropTypes.element,data:_react.PropTypes.array,domainPadding:_react.PropTypes.oneOfType([_react.PropTypes.shape({x:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain]),y:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain])}),_react.PropTypes.number]),dataComponent:_react.PropTypes.element,domain:_react.PropTypes.oneOfType([_victoryCore.PropTypes.domain,_react.PropTypes.shape({x:_victoryCore.PropTypes.domain,y:_victoryCore.PropTypes.domain})]),events:_react.PropTypes.arrayOf(_react.PropTypes.shape({target:_react.PropTypes.oneOf(["data","labels","parent"]),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.array,_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),eventHandlers:_react.PropTypes.object})),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),groupComponent:_react.PropTypes.element,height:_victoryCore.PropTypes.nonNegative,high:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),labels:_react.PropTypes.oneOfType([_react.PropTypes.func,_react.PropTypes.array]),labelComponent:_react.PropTypes.element,low:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),name:_react.PropTypes.string,open:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),samples:_victoryCore.PropTypes.nonNegative,scale:_react.PropTypes.oneOfType([_victoryCore.PropTypes.scale,_react.PropTypes.shape({x:_victoryCore.PropTypes.scale,y:_victoryCore.PropTypes.scale})]),sharedEvents:_react.PropTypes.shape({events:_react.PropTypes.array,getEventState:_react.PropTypes.func}),sortKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),size:_react.PropTypes.oneOfType([_victoryCore.PropTypes.nonNegative,_react.PropTypes.func]),standalone:_react.PropTypes.bool,style:_react.PropTypes.shape({parent:_react.PropTypes.object,data:_react.PropTypes.object,labels:_react.PropTypes.object}),theme:_react.PropTypes.object,width:_victoryCore.PropTypes.nonNegative,x:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)])};VictoryCandlestick.defaultProps={samples:50,scale:"linear",data:defaultData,standalone:true,dataComponent:_react2.default.createElement(_victoryCore.Candle,null),labelComponent:_react2.default.createElement(_victoryCore.VictoryLabel,null),containerComponent:_react2.default.createElement(_victoryCore.VictoryContainer,null),groupComponent:_react2.default.createElement("g",{role:"presentation"}),theme:_victoryCore.VictoryTheme.grayscale};VictoryCandlestick.getDomain=_helperMethods2.default.getDomain.bind(_helperMethods2.default);VictoryCandlestick.getData=_helperMethods2.default.getData.bind(_helperMethods2.default);VictoryCandlestick.getBaseProps=(0,_partialRight3.default)(_helperMethods2.default.getBaseProps.bind(_helperMethods2.default),fallbackProps);VictoryCandlestick.expectedComponents=["dataComponent","labelComponent","groupComponent","containerComponent"];exports.default=

@@ -210,0 +210,0 @@

@@ -246,4 +246,2 @@ Object.defineProperty(exports,"__esModule",{value:true});var _defaults2=require("lodash/defaults");var _defaults3=_interopRequireDefault(_defaults2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();

clipHeight:props.height,
domainPadding:child.props.domainPadding||
props.domainPadding||calculatedProps.defaultDomainPadding,
padding:_victoryCore.Helpers.getPadding(props),

@@ -250,0 +248,0 @@ key:index,

@@ -165,3 +165,3 @@ Object.defineProperty(exports,"__esModule",{value:true});var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require("react");var _react2=_interopRequireDefault(_react);

var children=[].concat(_toConsumableArray(dataComponents),_toConsumableArray(labelComponents));
return this.renderContainer(groupComponent,props,children);
return this.renderContainer(groupComponent,children,{});
}},{key:"shouldAnimate",value:function shouldAnimate()

@@ -173,4 +173,4 @@

component,props,children){
var parentProps=this.getComponentProps(component,"parent","parent");
component,children,props){
var parentProps=props||this.getComponentProps(component,"parent","parent");
return _react2.default.cloneElement(component,parentProps,children);

@@ -190,3 +190,3 @@ }},{key:"render",value:function render()

var children=this.renderData(props);
return this.renderContainer(props.containerComponent,props,children);
return this.renderContainer(props.containerComponent,children);
}}]);return VictoryErrorBar;}(_react2.default.Component);VictoryErrorBar.displayName="VictoryErrorBar";VictoryErrorBar.role="errorBar";VictoryErrorBar.defaultTransitions=_victoryCore.DefaultTransitions.discreteTransitions();VictoryErrorBar.propTypes={animate:_react.PropTypes.object,borderWidth:_react.PropTypes.number,categories:_react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.string),_react.PropTypes.shape({x:_react.PropTypes.arrayOf(_react.PropTypes.string),y:_react.PropTypes.arrayOf(_react.PropTypes.string)})]),containerComponent:_react.PropTypes.element,data:_react.PropTypes.array,domainPadding:_react.PropTypes.oneOfType([_react.PropTypes.shape({x:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain]),y:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain])}),_react.PropTypes.number]),dataComponent:_react.PropTypes.element,domain:_react.PropTypes.oneOfType([_victoryCore.PropTypes.domain,_react.PropTypes.shape({x:_victoryCore.PropTypes.domain,y:_victoryCore.PropTypes.domain})]),errorX:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),errorY:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),events:_react.PropTypes.arrayOf(_react.PropTypes.shape({target:_react.PropTypes.oneOf(["data","labels","parent"]),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.array,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),eventHandlers:_react.PropTypes.object})),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),groupComponent:_react.PropTypes.element,height:_victoryCore.PropTypes.nonNegative,horizontal:_react.PropTypes.bool,labels:_react.PropTypes.oneOfType([_react.PropTypes.func,_react.PropTypes.array]),labelComponent:_react.PropTypes.element,name:_react.PropTypes.string,padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),samples:_victoryCore.PropTypes.nonNegative,scale:_react.PropTypes.oneOfType([_victoryCore.PropTypes.scale,_react.PropTypes.shape({x:_victoryCore.PropTypes.scale,y:_victoryCore.PropTypes.scale})]),sharedEvents:_react.PropTypes.shape({events:_react.PropTypes.array,getEventState:_react.PropTypes.func}),sortKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),standalone:_react.PropTypes.bool,style:_react.PropTypes.shape({parent:_react.PropTypes.object,data:_react.PropTypes.object,labels:_react.PropTypes.object}),theme:_react.PropTypes.object,width:_victoryCore.PropTypes.nonNegative,x:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),y:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string),_react.PropTypes.arrayOf(_react.PropTypes.func)])};VictoryErrorBar.defaultProps={data:defaultData,scale:"linear",standalone:true,dataComponent:_react2.default.createElement(_victoryCore.ErrorBar,null),labelComponent:_react2.default.createElement(_victoryCore.VictoryLabel,null),containerComponent:_react2.default.createElement(_victoryCore.VictoryContainer,null),groupComponent:_react2.default.createElement("g",{role:"presentation"}),theme:_victoryCore.VictoryTheme.grayscale};VictoryErrorBar.getDomain=_helperMethods2.default.getDomain.bind(_helperMethods2.default);VictoryErrorBar.getData=_victoryCore.Data.getData.bind(_victoryCore.Data);VictoryErrorBar.getBaseProps=(0,_partialRight3.default)(_helperMethods2.default.getBaseProps.bind(_helperMethods2.default),fallbackProps);VictoryErrorBar.expectedComponents=["dataComponent","labelComponent","groupComponent","containerComponent"];exports.default=

@@ -193,0 +193,0 @@

@@ -250,4 +250,4 @@ Object.defineProperty(exports,"__esModule",{value:true});var _defaults2=require("lodash/defaults");var _defaults3=_interopRequireDefault(_defaults2);var _assign2=require("lodash/assign");var _assign3=_interopRequireDefault(_assign2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();

props,childComponents,calculatedProps){var _this2=this;var
datasets=calculatedProps.datasets,horizontal=calculatedProps.horizontal;var
offset=props.offset,theme=props.theme,labelComponent=props.labelComponent;
datasets=calculatedProps.datasets,horizontal=calculatedProps.horizontal,domain=calculatedProps.domain;var
theme=props.theme,labelComponent=props.labelComponent;
var childProps=this.getChildProps(props,calculatedProps);

@@ -262,9 +262,4 @@ var getAnimationProps=_wrapper2.default.getAnimationProps.bind(this);

var labels=props.labels?_this2.getLabels(props,datasets,index):child.props.labels;
var defaultDomainPadding=horizontal?
{y:offset*childComponents.length/2}:
{x:offset*childComponents.length/2};
var domainPadding=child.props.domainPadding||
props.domainPadding||defaultDomainPadding;
return _react2.default.cloneElement(child,(0,_assign3.default)({
domainPadding:domainPadding,labels:labels,style:style,theme:theme,horizontal:horizontal,
domain:domain,labels:labels,style:style,theme:theme,horizontal:horizontal,
data:_this2.getDataWithOffset(props,datasets[index],xOffset),

@@ -271,0 +266,0 @@ animate:getAnimationProps(props,child,index),

@@ -143,3 +143,3 @@ Object.defineProperty(exports,"__esModule",{value:true});var _without2=require("lodash/without");var _without3=_interopRequireDefault(_without2);var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();

var children=[_react2.default.cloneElement(dataComponent,dataProps)].concat(_toConsumableArray(labelComponents));
return this.renderContainer(groupComponent,props,children);
return this.renderContainer(groupComponent,children,{});
}},{key:"shouldAnimate",value:function shouldAnimate()

@@ -151,4 +151,4 @@

component,props,children){
var parentProps=this.getComponentProps(component,"parent","parent");
component,children,props){
var parentProps=props||this.getComponentProps(component,"parent","parent");
return _react2.default.cloneElement(component,parentProps,children);

@@ -168,5 +168,5 @@ }},{key:"render",value:function render()

var children=this.renderData(props);
return this.renderContainer(props.containerComponent,props,children);
return this.renderContainer(props.containerComponent,children);
}}]);return VictoryLine;}(_react2.default.Component);VictoryLine.displayName="VictoryLine";VictoryLine.role="line";VictoryLine.defaultTransitions=_victoryCore.DefaultTransitions.continuousTransitions();VictoryLine.continuous=true;VictoryLine.propTypes={animate:_react.PropTypes.object,categories:_react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.string),_react.PropTypes.shape({x:_react.PropTypes.arrayOf(_react.PropTypes.string),y:_react.PropTypes.arrayOf(_react.PropTypes.string)})]),containerComponent:_react.PropTypes.element,data:_react.PropTypes.array,domainPadding:_react.PropTypes.oneOfType([_react.PropTypes.shape({x:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain]),y:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain])}),_react.PropTypes.number]),dataComponent:_react.PropTypes.element,domain:_react.PropTypes.oneOfType([_victoryCore.PropTypes.domain,_react.PropTypes.shape({x:_victoryCore.PropTypes.domain,y:_victoryCore.PropTypes.domain})]),events:_react.PropTypes.arrayOf(_react.PropTypes.shape({target:_react.PropTypes.oneOf(["data","labels","parent"]),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.array,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),eventHandlers:_react.PropTypes.object})),groupComponent:_react.PropTypes.element,height:_victoryCore.PropTypes.nonNegative,interpolation:_react.PropTypes.oneOf(["basis","bundle","cardinal","catmullRom","linear","monotoneX","monotoneY","natural","radial","step","stepAfter","stepBefore"]),Label:_victoryCore.PropTypes.deprecated(_react.PropTypes.string,"Use `labels` instead for individual data labels"),labels:_react.PropTypes.oneOfType([_react.PropTypes.func,_react.PropTypes.array]),labelComponent:_react.PropTypes.element,name:_react.PropTypes.string,padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),samples:_victoryCore.PropTypes.nonNegative,scale:_react.PropTypes.oneOfType([_victoryCore.PropTypes.scale,_react.PropTypes.shape({x:_victoryCore.PropTypes.scale,y:_victoryCore.PropTypes.scale})]),sharedEvents:_react.PropTypes.shape({events:_react.PropTypes.array,getEventState:_react.PropTypes.func}),sortKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),standalone:_react.PropTypes.bool,style:_react.PropTypes.shape({parent:_react.PropTypes.object,data:_react.PropTypes.object,labels:_react.PropTypes.object}),theme:_react.PropTypes.object,width:_victoryCore.PropTypes.nonNegative,x:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),y:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)])};VictoryLine.defaultProps={samples:50,scale:"linear",standalone:true,sortKey:"x",dataComponent:_react2.default.createElement(_victoryCore.Curve,null),labelComponent:_react2.default.createElement(_victoryCore.VictoryLabel,null),containerComponent:_react2.default.createElement(_victoryCore.VictoryContainer,null),groupComponent:_react2.default.createElement(_victoryCore.VictoryClipContainer,null),theme:_victoryCore.VictoryTheme.grayscale};VictoryLine.getDomain=_victoryCore.Domain.getDomain.bind(_victoryCore.Domain);VictoryLine.getData=_victoryCore.Data.getData.bind(_victoryCore.Data);VictoryLine.getBaseProps=(0,_partialRight3.default)(_helperMethods2.default.getBaseProps.bind(_helperMethods2.default),fallbackProps);VictoryLine.expectedComponents=["dataComponent","labelComponent","groupComponent","containerComponent"];exports.default=
(0,_victoryCore.addEvents)(VictoryLine);

@@ -152,3 +152,3 @@ Object.defineProperty(exports,"__esModule",{value:true});var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require("react");var _react2=_interopRequireDefault(_react);

var children=[].concat(_toConsumableArray(dataComponents),_toConsumableArray(labelComponents));
return this.renderContainer(groupComponent,props,children);
return this.renderContainer(groupComponent,children,{});
}},{key:"shouldAnimate",value:function shouldAnimate()

@@ -160,4 +160,4 @@

component,props,children){
var parentProps=this.getComponentProps(component,"parent","parent");
component,children,props){
var parentProps=props||this.getComponentProps(component,"parent","parent");
return _react2.default.cloneElement(component,parentProps,children);

@@ -177,3 +177,3 @@ }},{key:"render",value:function render()

var children=this.renderData(props);
return this.renderContainer(props.containerComponent,props,children);
return this.renderContainer(props.containerComponent,children);
}}]);return VictoryScatter;}(_react2.default.Component);VictoryScatter.displayName="VictoryScatter";VictoryScatter.role="scatter";VictoryScatter.defaultTransitions=_victoryCore.DefaultTransitions.discreteTransitions();VictoryScatter.propTypes={animate:_react.PropTypes.object,bubbleProperty:_react.PropTypes.string,categories:_react.PropTypes.oneOfType([_react.PropTypes.arrayOf(_react.PropTypes.string),_react.PropTypes.shape({x:_react.PropTypes.arrayOf(_react.PropTypes.string),y:_react.PropTypes.arrayOf(_react.PropTypes.string)})]),containerComponent:_react.PropTypes.element,data:_react.PropTypes.array,domainPadding:_react.PropTypes.oneOfType([_react.PropTypes.shape({x:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain]),y:_react.PropTypes.oneOfType([_react.PropTypes.number,_victoryCore.PropTypes.domain])}),_react.PropTypes.number]),dataComponent:_react.PropTypes.element,domain:_react.PropTypes.oneOfType([_victoryCore.PropTypes.domain,_react.PropTypes.shape({x:_victoryCore.PropTypes.domain,y:_victoryCore.PropTypes.domain})]),events:_react.PropTypes.arrayOf(_react.PropTypes.shape({target:_react.PropTypes.oneOf(["data","labels","parent"]),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.array,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),eventHandlers:_react.PropTypes.object})),eventKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string]),groupComponent:_react.PropTypes.element,height:_victoryCore.PropTypes.nonNegative,labels:_react.PropTypes.oneOfType([_react.PropTypes.func,_react.PropTypes.array]),labelComponent:_react.PropTypes.element,maxBubbleSize:_victoryCore.PropTypes.nonNegative,name:_react.PropTypes.string,padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),samples:_victoryCore.PropTypes.nonNegative,scale:_react.PropTypes.oneOfType([_victoryCore.PropTypes.scale,_react.PropTypes.shape({x:_victoryCore.PropTypes.scale,y:_victoryCore.PropTypes.scale})]),sharedEvents:_react.PropTypes.shape({events:_react.PropTypes.array,getEventState:_react.PropTypes.func}),sortKey:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),standalone:_react.PropTypes.bool,style:_react.PropTypes.shape({parent:_react.PropTypes.object,data:_react.PropTypes.object,labels:_react.PropTypes.object}),symbol:_react.PropTypes.oneOfType([_react.PropTypes.oneOf(["circle","diamond","plus","square","star","triangleDown","triangleUp"]),_react.PropTypes.func]),theme:_react.PropTypes.object,width:_victoryCore.PropTypes.nonNegative,x:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)]),y:_react.PropTypes.oneOfType([_react.PropTypes.func,_victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer,_victoryCore.PropTypes.nonNegative]),_react.PropTypes.string,_react.PropTypes.arrayOf(_react.PropTypes.string)])};VictoryScatter.defaultProps={samples:50,scale:"linear",standalone:true,dataComponent:_react2.default.createElement(_victoryCore.Point,null),labelComponent:_react2.default.createElement(_victoryCore.VictoryLabel,null),containerComponent:_react2.default.createElement(_victoryCore.VictoryContainer,null),groupComponent:_react2.default.createElement("g",null),theme:_victoryCore.VictoryTheme.grayscale};VictoryScatter.getDomain=_victoryCore.Domain.getDomain.bind(_victoryCore.Domain);VictoryScatter.getData=_victoryCore.Data.getData.bind(_victoryCore.Data);VictoryScatter.getBaseProps=(0,_partialRight3.default)(_helperMethods2.default.getBaseProps.bind(_helperMethods2.default),fallbackProps);VictoryScatter.expectedComponents=["dataComponent","labelComponent","groupComponent","containerComponent"];exports.default=

@@ -180,0 +180,0 @@

@@ -16,2 +16,21 @@ Object.defineProperty(exports,"__esModule",{value:true});var _some2=require("lodash/some");var _some3=_interopRequireDefault(_some2);var _uniq2=require("lodash/uniq");var _uniq3=_interopRequireDefault(_uniq2);var _partialRight2=require("lodash/partialRight");var _partialRight3=_interopRequireDefault(_partialRight2);var _isFunction2=require("lodash/isFunction");var _isFunction3=_interopRequireDefault(_isFunction2);var _flatten2=require("lodash/flatten");var _flatten3=_interopRequireDefault(_flatten2);var _defaults2=require("lodash/defaults");var _defaults3=_interopRequireDefault(_defaults2);var _assign2=require("lodash/assign");var _assign3=_interopRequireDefault(_assign2);

getDefaultDomainPadding:function getDefaultDomainPadding(props,axis,childComponents){
var horizontalChildren=childComponents.some(function(component){
return component.props&&component.props.horizontal;
});
var horizontal=props&&props.horizontal||horizontalChildren;
var groupComponent=childComponents.filter(function(child){
return child.type&&child.type.role&&child.type.role==="group";
});
if(groupComponent.length<1){
return undefined;
}var _groupComponent$0$pro=
groupComponent[0].props,offset=_groupComponent$0$pro.offset,children=_groupComponent$0$pro.children;
var defaultDomainPadding=horizontal?
{y:offset*children.length/2}:
{x:offset*children.length/2};
return defaultDomainPadding[axis];
},
getDomain:function getDomain(props,axis,childComponents){

@@ -28,3 +47,6 @@ childComponents=childComponents||_react2.default.Children.toArray(props.children);

var max=_victoryCore.Collection.getMaxValue([].concat(_toConsumableArray(dataDomain),_toConsumableArray(childDomain)));
return _victoryCore.Domain.cleanDomain([min,max],props,axis);
var domainPadding=this.getDefaultDomainPadding(props,axis,childComponents);
var paddedDomain=_victoryCore.Domain.padDomain([min,max],(0,_assign3.default)({domainPadding:domainPadding},props),axis);
return _victoryCore.Domain.cleanDomain(paddedDomain,props,axis);
},

@@ -31,0 +53,0 @@

{
"name": "victory-chart",
"version": "18.1.2",
"version": "18.1.3",
"description": "Chart Component for Victory",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -141,7 +141,7 @@ import { partialRight, without } from "lodash";

const children = [React.cloneElement(dataComponent, dataProps), ...labelComponents];
return this.renderContainer(groupComponent, props, children);
return this.renderContainer(groupComponent, children, {});
}
renderContainer(component, props, children) {
const parentProps = this.getComponentProps(component, "parent", "parent");
renderContainer(component, children, props) {
const parentProps = props || this.getComponentProps(component, "parent", "parent");
return React.cloneElement(component, parentProps, children);

@@ -166,3 +166,3 @@ }

const children = this.renderData(props);
return this.renderContainer(props.containerComponent, props, children);
return this.renderContainer(props.containerComponent, children);
}

@@ -169,0 +169,0 @@ }

@@ -189,4 +189,4 @@ import React, { PropTypes } from "react";

renderContainer(component, props, children) {
const parentProps = this.getComponentProps(component, "parent", "parent");
renderContainer(component, children, props) {
const parentProps = props || this.getComponentProps(component, "parent", "parent");
return React.cloneElement(component, parentProps, children);

@@ -218,3 +218,3 @@ }

];
return this.renderContainer(props.containerComponent, props, children);
return this.renderContainer(props.containerComponent, children);
}

@@ -221,0 +221,0 @@ }

@@ -164,3 +164,3 @@ import React, { PropTypes } from "react";

const children = [...dataComponents, ...labelComponents];
return this.renderContainer(groupComponent, props, children);
return this.renderContainer(groupComponent, children, {});

@@ -173,4 +173,4 @@ }

renderContainer(component, props, children) {
const parentProps = this.getComponentProps(component, "parent", "parent");
renderContainer(component, children, props) {
const parentProps = props || this.getComponentProps(component, "parent", "parent");
return React.cloneElement(component, parentProps, children);

@@ -190,3 +190,3 @@ }

const children = this.renderData(props);
return this.renderContainer(props.containerComponent, props, children);
return this.renderContainer(props.containerComponent, children);
}

@@ -193,0 +193,0 @@ }

@@ -182,3 +182,3 @@ import React, { PropTypes } from "react";

const children = [...dataComponents, ...labelComponents];
return this.renderContainer(groupComponent, props, children);
return this.renderContainer(groupComponent, children, {});
}

@@ -190,4 +190,4 @@

renderContainer(component, props, children) {
const parentProps = this.getComponentProps(component, "parent", "parent");
renderContainer(component, children, props) {
const parentProps = props || this.getComponentProps(component, "parent", "parent");
return React.cloneElement(component, parentProps, children);

@@ -207,3 +207,3 @@ }

const children = this.renderData(props);
return this.renderContainer(props.containerComponent, props, children);
return this.renderContainer(props.containerComponent, children);
}

@@ -210,0 +210,0 @@ }

@@ -246,4 +246,2 @@ import { defaults } from "lodash";

clipHeight: props.height,
domainPadding: child.props.domainPadding ||
props.domainPadding || calculatedProps.defaultDomainPadding,
padding: Helpers.getPadding(props),

@@ -250,0 +248,0 @@ key: index,

@@ -165,3 +165,3 @@ import React, { PropTypes } from "react";

const children = [...dataComponents, ...labelComponents];
return this.renderContainer(groupComponent, props, children);
return this.renderContainer(groupComponent, children, {});
}

@@ -173,4 +173,4 @@

renderContainer(component, props, children) {
const parentProps = this.getComponentProps(component, "parent", "parent");
renderContainer(component, children, props) {
const parentProps = props || this.getComponentProps(component, "parent", "parent");
return React.cloneElement(component, parentProps, children);

@@ -190,3 +190,3 @@ }

const children = this.renderData(props);
return this.renderContainer(props.containerComponent, props, children);
return this.renderContainer(props.containerComponent, children);
}

@@ -193,0 +193,0 @@ }

@@ -250,4 +250,4 @@ import { assign, defaults } from "lodash";

getNewChildren(props, childComponents, calculatedProps) {
const { datasets, horizontal } = calculatedProps;
const { offset, theme, labelComponent } = props;
const { datasets, horizontal, domain } = calculatedProps;
const { theme, labelComponent } = props;
const childProps = this.getChildProps(props, calculatedProps);

@@ -262,9 +262,4 @@ const getAnimationProps = Wrapper.getAnimationProps.bind(this);

const labels = props.labels ? this.getLabels(props, datasets, index) : child.props.labels;
const defaultDomainPadding = horizontal ?
{y: (offset * childComponents.length) / 2} :
{x: (offset * childComponents.length) / 2};
const domainPadding = child.props.domainPadding ||
props.domainPadding || defaultDomainPadding;
return React.cloneElement(child, assign({
domainPadding, labels, style, theme, horizontal,
domain, labels, style, theme, horizontal,
data: this.getDataWithOffset(props, datasets[index], xOffset),

@@ -271,0 +266,0 @@ animate: getAnimationProps(props, child, index),

@@ -143,3 +143,3 @@ import { partialRight, without } from "lodash";

const children = [React.cloneElement(dataComponent, dataProps), ...labelComponents];
return this.renderContainer(groupComponent, props, children);
return this.renderContainer(groupComponent, children, {});
}

@@ -151,4 +151,4 @@

renderContainer(component, props, children) {
const parentProps = this.getComponentProps(component, "parent", "parent");
renderContainer(component, children, props) {
const parentProps = props || this.getComponentProps(component, "parent", "parent");
return React.cloneElement(component, parentProps, children);

@@ -168,5 +168,5 @@ }

const children = this.renderData(props);
return this.renderContainer(props.containerComponent, props, children);
return this.renderContainer(props.containerComponent, children);
}
}
export default addEvents(VictoryLine);

@@ -152,3 +152,3 @@ import React, { PropTypes } from "react";

const children = [...dataComponents, ...labelComponents];
return this.renderContainer(groupComponent, props, children);
return this.renderContainer(groupComponent, children, {});
}

@@ -160,4 +160,4 @@

renderContainer(component, props, children) {
const parentProps = this.getComponentProps(component, "parent", "parent");
renderContainer(component, children, props) {
const parentProps = props || this.getComponentProps(component, "parent", "parent");
return React.cloneElement(component, parentProps, children);

@@ -177,3 +177,3 @@ }

const children = this.renderData(props);
return this.renderContainer(props.containerComponent, props, children);
return this.renderContainer(props.containerComponent, children);
}

@@ -180,0 +180,0 @@ }

@@ -16,2 +16,21 @@ import { assign, defaults, flatten, isFunction, partialRight, uniq, some } from "lodash";

getDefaultDomainPadding(props, axis, childComponents) {
const horizontalChildren = childComponents.some((component) => {
return component.props && component.props.horizontal;
});
const horizontal = props && props.horizontal || horizontalChildren;
const groupComponent = childComponents.filter((child) => {
return child.type && child.type.role && child.type.role === "group";
});
if (groupComponent.length < 1) {
return undefined;
}
const { offset, children } = groupComponent[0].props;
const defaultDomainPadding = horizontal ?
{y: (offset * children.length) / 2} :
{x: (offset * children.length) / 2};
return defaultDomainPadding[axis];
},
getDomain(props, axis, childComponents) {

@@ -28,3 +47,6 @@ childComponents = childComponents || React.Children.toArray(props.children);

const max = Collection.getMaxValue([...dataDomain, ...childDomain]);
return Domain.cleanDomain([min, max], props, axis);
const domainPadding = this.getDefaultDomainPadding(props, axis, childComponents);
const paddedDomain = Domain.padDomain([min, max], assign({domainPadding}, props), axis);
return Domain.cleanDomain(paddedDomain, props, axis);
},

@@ -31,0 +53,0 @@

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

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc