react-offcharts-core
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -30,2 +30,3 @@ import React from 'react'; | ||
); | ||
expect(typeof Chart.prototype.onResize).toBe('function'); | ||
// try to resize jsdom | ||
@@ -32,0 +33,0 @@ expect(Component2.find(Test).length).toBe(0); |
{ | ||
"name": "react-offcharts-core", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "A Core Library for React Offcharts", | ||
@@ -59,2 +59,3 @@ "main": "./dist/index.js", | ||
"lodash.throttle": "^4.1.1", | ||
"prop-types": "^15.5.8", | ||
"react": "^15.4.1", | ||
@@ -61,0 +62,0 @@ "react-dom": "^15.4.1", |
@@ -1,2 +0,3 @@ | ||
import React, { Component, PropTypes } from 'react'; | ||
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import throttle from 'lodash.throttle'; | ||
@@ -35,9 +36,7 @@ import ResizeObserver from 'resize-observer-polyfill'; | ||
} | ||
/* | ||
register the throttled resize function if responsive is set to true | ||
*/ | ||
componentDidMount() { | ||
if (this.props.responsive === true) { | ||
this.ro = new ResizeObserver((ent, obs) => { | ||
throttle(this.onResize(), 250); | ||
this.onResize(); | ||
}); | ||
@@ -44,0 +43,0 @@ this.ro.observe(this.chart); |
@@ -1,2 +0,3 @@ | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { color } from 'd3-color'; | ||
@@ -23,3 +24,3 @@ | ||
y2={y2} | ||
gradientUnits="userSpaceOnUse" | ||
gradientUnits={gradientUnits} | ||
> | ||
@@ -49,7 +50,7 @@ {stops} | ||
y2: 1, | ||
gradientUnits: 'userSpaceOnUse', | ||
gradientUnits: 'objectBoundingBox', | ||
}; | ||
export const RadialGradient = ({ id, cx, cy, r, fx, fy, stops }) => ( | ||
export const RadialGradient = ({ id, cx, cy, r, fx, fy, stops, gradientUnits }) => ( | ||
<defs> | ||
@@ -63,3 +64,3 @@ <radialGradient | ||
fy={fy} | ||
gradientUnits="userSpaceOnUse" | ||
gradientUnits={gradientUnits} | ||
> | ||
@@ -78,2 +79,3 @@ {stops} | ||
fy: PropTypes.number, | ||
gradientUnits: PropTypes.string, | ||
stops: PropTypes.oneOfType([ | ||
@@ -85,2 +87,6 @@ PropTypes.arrayOf(PropTypes.node), | ||
RadialGradient.defaultProps = { | ||
gradientUnits: 'objectBoundingBox', | ||
}; | ||
// If the user sets gradient by type | ||
@@ -87,0 +93,0 @@ export default (props) => { |
@@ -1,2 +0,3 @@ | ||
import React, { Component, PropTypes } from 'react'; | ||
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -3,0 +4,0 @@ const shadows = props => ( |
@@ -1,2 +0,3 @@ | ||
import React, { Children, PropTypes } from 'react'; | ||
import React, { Children } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import cloneChildren from '../Utils/cloneChildren'; | ||
@@ -3,0 +4,0 @@ /* |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39162
44
1090
8
+ Addedprop-types@^15.5.8