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

victory-polar-axis

Package Overview
Dependencies
Maintainers
2
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-polar-axis - npm Package Compare versions

Comparing version 31.1.0 to 31.2.0

11

es/helper-methods.js

@@ -131,12 +131,11 @@ import _isFunction from "lodash/isFunction";

startAngle = props.startAngle,
axisValue = props.axisValue,
dependentAxis = props.dependentAxis,
scale = props.scale;
var otherAxis = Axis.getAxis(props) === "y" ? "x" : "y";
dependentAxis = props.dependentAxis;
var axis = Axis.getAxis(props);
var axisValue = Axis.getAxisValue(props, axis);
if (axisValue === undefined || !dependentAxis || scale[otherAxis] === undefined) {
if (axisValue === undefined || !dependentAxis) {
return axisAngle === undefined ? startAngle : axisAngle;
}
return Helpers.radiansToDegrees(scale.x(axisValue));
return Helpers.radiansToDegrees(axisValue);
}; //eslint-disable-next-line max-params

@@ -143,0 +142,0 @@

@@ -36,2 +36,20 @@ import _assign from "lodash/assign";

};
var options = {
components: [{
name: "axis",
index: 0
}, {
name: "axisLabel",
index: 0
}, {
name: "grid"
}, {
name: "parent",
index: "parent"
}, {
name: "ticks"
}, {
name: "tickLabels"
}]
};

@@ -182,3 +200,3 @@ var VictoryPolarAxis =

axisLabelComponent: PropTypes.element,
axisValue: PropTypes.number,
axisValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object]),
categories: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.shape({

@@ -292,2 +310,2 @@ x: PropTypes.arrayOf(PropTypes.string),

});
export default addEvents(VictoryPolarAxis);
export default addEvents(VictoryPolarAxis, options);

@@ -152,12 +152,13 @@ "use strict";

startAngle = props.startAngle,
axisValue = props.axisValue,
dependentAxis = props.dependentAxis,
scale = props.scale;
var otherAxis = _victoryCore.Axis.getAxis(props) === "y" ? "x" : "y";
dependentAxis = props.dependentAxis;
if (axisValue === undefined || !dependentAxis || scale[otherAxis] === undefined) {
var axis = _victoryCore.Axis.getAxis(props);
var axisValue = _victoryCore.Axis.getAxisValue(props, axis);
if (axisValue === undefined || !dependentAxis) {
return axisAngle === undefined ? startAngle : axisAngle;
}
return _victoryCore.Helpers.radiansToDegrees(scale.x(axisValue));
return _victoryCore.Helpers.radiansToDegrees(axisValue);
}; //eslint-disable-next-line max-params

@@ -164,0 +165,0 @@

@@ -49,2 +49,20 @@ "use strict";

};
var options = {
components: [{
name: "axis",
index: 0
}, {
name: "axisLabel",
index: 0
}, {
name: "grid"
}, {
name: "parent",
index: "parent"
}, {
name: "ticks"
}, {
name: "tickLabels"
}]
};

@@ -195,3 +213,3 @@ var VictoryPolarAxis =

axisLabelComponent: _propTypes.default.element,
axisValue: _propTypes.default.number,
axisValue: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.object]),
categories: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.shape({

@@ -306,4 +324,4 @@ x: _propTypes.default.arrayOf(_propTypes.default.string),

var _default = (0, _victoryCore.addEvents)(VictoryPolarAxis);
var _default = (0, _victoryCore.addEvents)(VictoryPolarAxis, options);
exports.default = _default;
{
"name": "victory-polar-axis",
"version": "31.1.0",
"version": "31.2.0",
"description": "Polar Axis Component for Victory",

@@ -24,3 +24,3 @@ "keywords": [

"prop-types": "^15.5.8",
"victory-core": "^31.1.0"
"victory-core": "^31.2.0"
},

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

@@ -109,8 +109,9 @@ import { assign, uniqBy, defaults, isFunction } from "lodash";

const getAxisAngle = (props) => {
const { axisAngle, startAngle, axisValue, dependentAxis, scale } = props;
const otherAxis = Axis.getAxis(props) === "y" ? "x" : "y";
if (axisValue === undefined || !dependentAxis || scale[otherAxis] === undefined) {
const { axisAngle, startAngle, dependentAxis } = props;
const axis = Axis.getAxis(props);
const axisValue = Axis.getAxisValue(props, axis);
if (axisValue === undefined || !dependentAxis) {
return axisAngle === undefined ? startAngle : axisAngle;
}
return Helpers.radiansToDegrees(scale.x(axisValue));
return Helpers.radiansToDegrees(axisValue);
};

@@ -117,0 +118,0 @@

@@ -24,2 +24,13 @@ import React from "react";

const options = {
components: [
{ name: "axis", index: 0 },
{ name: "axisLabel", index: 0 },
{ name: "grid" },
{ name: "parent", index: "parent" },
{ name: "ticks" },
{ name: "tickLabels" }
]
};
class VictoryPolarAxis extends React.Component {

@@ -55,3 +66,3 @@ static animationWhitelist = [

axisLabelComponent: PropTypes.element,
axisValue: PropTypes.number,
axisValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object]),
categories: PropTypes.oneOfType([

@@ -217,2 +228,2 @@ PropTypes.arrayOf(PropTypes.string),

export default addEvents(VictoryPolarAxis);
export default addEvents(VictoryPolarAxis, options);

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