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

@data-ui/radial-chart

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@data-ui/radial-chart - npm Package Compare versions

Comparing version 0.0.73 to 0.0.74

2

esm/chart/RadialChart.js

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

import"core-js/modules/es6.object.assign";function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}import{Group}from"@vx/group";import PropTypes from"prop-types";import React from"react";import{WithTooltip,withTooltipPropTypes}from"@data-ui/shared";export var propTypes=Object.assign({},withTooltipPropTypes,{ariaLabel:PropTypes.string.isRequired,children:PropTypes.node.isRequired,width:PropTypes.number.isRequired,height:PropTypes.number.isRequired,margin:PropTypes.shape({top:PropTypes.number,right:PropTypes.number,bottom:PropTypes.number,left:PropTypes.number}),renderTooltip:PropTypes.func});var defaultProps={margin:{top:10,left:10,right:10,bottom:10},renderTooltip:null},MIN_SIZE=10;export default function RadialChart(a){var b=a.renderTooltip;if(b)return React.createElement(WithTooltip,{renderTooltip:b},React.createElement(RadialChart,_extends({},a,{renderTooltip:null})));var c=a.ariaLabel,d=a.children,e=a.width,f=a.height,g=a.margin,h=a.onMouseMove,i=a.onMouseLeave,j=Object.assign({},defaultProps.margin,g),k=e-j.left-j.right,l=f-j.top-j.bottom,m=Math.min(k,l)/2;return k<MIN_SIZE||l<MIN_SIZE?null:React.createElement("svg",{"aria-label":c,role:"img",width:e,height:f},React.createElement(Group,{top:f/2-j.top,left:e/2+g.left},React.Children.map(d,function(a){return React.cloneElement(a,{onMouseMove:a.props.onMouseMove||h,onMouseLeave:a.props.onMouseLeave||i,radius:m})})))}RadialChart.propTypes=propTypes,RadialChart.defaultProps=defaultProps,RadialChart.displayName="RadialChart";
function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}import{Group}from"@vx/group";import PropTypes from"prop-types";import React from"react";import{WithTooltip,withTooltipPropTypes}from"@data-ui/shared";export var propTypes=_extends({},withTooltipPropTypes,{ariaLabel:PropTypes.string.isRequired,children:PropTypes.node.isRequired,width:PropTypes.number.isRequired,height:PropTypes.number.isRequired,margin:PropTypes.shape({top:PropTypes.number,right:PropTypes.number,bottom:PropTypes.number,left:PropTypes.number}),renderTooltip:PropTypes.func});var defaultProps={margin:{top:10,left:10,right:10,bottom:10},renderTooltip:null},MIN_SIZE=10;export default function RadialChart(a){var b=a.renderTooltip;if(b)return React.createElement(WithTooltip,{renderTooltip:b},React.createElement(RadialChart,_extends({},a,{renderTooltip:null})));var c=a.ariaLabel,d=a.children,e=a.width,f=a.height,g=a.margin,h=a.onMouseMove,i=a.onMouseLeave,j=_extends({},defaultProps.margin,g),k=e-j.left-j.right,l=f-j.top-j.bottom,m=Math.min(k,l)/2;return k<MIN_SIZE||l<MIN_SIZE?null:React.createElement("svg",{"aria-label":c,role:"img",width:e,height:f},React.createElement(Group,{top:f/2-j.top,left:e/2+g.left},React.Children.map(d,function(a){return React.cloneElement(a,{onMouseMove:a.props.onMouseMove||h,onMouseLeave:a.props.onMouseLeave||i,radius:m})})))}RadialChart.propTypes=propTypes,RadialChart.defaultProps=defaultProps,RadialChart.displayName="RadialChart";

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

import"core-js/modules/es6.object.assign";import"core-js/modules/web.dom.iterable";import"core-js/modules/es6.array.iterator";import"core-js/modules/es6.object.keys";function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}import React from"react";import PropTypes from"prop-types";import{svgLabel}from"@data-ui/theme";import additionalProps from"../util/additionalProps";var baseLabel=svgLabel.baseLabel,propTypes={x:PropTypes.number,y:PropTypes.number,paintOrder:PropTypes.string,// eslint-disable-next-line react/forbid-prop-types
function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}import React from"react";import PropTypes from"prop-types";import{svgLabel}from"@data-ui/theme";import additionalProps from"../util/additionalProps";var baseLabel=svgLabel.baseLabel,propTypes={x:PropTypes.number,y:PropTypes.number,paintOrder:PropTypes.string,// eslint-disable-next-line react/forbid-prop-types
arc:PropTypes.object,// if passed, will be passed to any restprops
children:PropTypes.node},defaultProps={x:0,y:0,paintOrder:"stroke",arc:null,children:null};export default function ArcLabel(a){var b=a.x,c=a.y,d=a.children,e=a.arc,f=_objectWithoutPropertiesLoose(a,["x","y","children","arc"]);return React.createElement("text",_extends({x:b,y:c},baseLabel,additionalProps(f,e)),d)}ArcLabel.propTypes=propTypes,ArcLabel.defaultProps=defaultProps;

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

import"core-js/modules/es6.object.assign";import"core-js/modules/web.dom.iterable";import"core-js/modules/es6.array.iterator";import"core-js/modules/es6.object.keys";import"core-js/modules/es6.array.fill";function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}import{Arc}from"@vx/shape";import React from"react";import PropTypes from"prop-types";import ArcLabel from"../label/ArcLabel";import callOrValue from"../util/callOrValue";import{singleHueScaleFactory}from"../util/fillScaleFactory";var grayScale=singleHueScaleFactory(),propTypes={data:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string})).isRequired,pieValue:PropTypes.func.isRequired,// (d) => pie value
function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}import{Arc}from"@vx/shape";import React from"react";import PropTypes from"prop-types";import ArcLabel from"../label/ArcLabel";import callOrValue from"../util/callOrValue";import{singleHueScaleFactory}from"../util/fillScaleFactory";var grayScale=singleHueScaleFactory(),propTypes={data:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.string})).isRequired,pieValue:PropTypes.func.isRequired,// (d) => pie value
pieSort:PropTypes.func,radius:PropTypes.number,// likely passed by parent

@@ -3,0 +3,0 @@ innerRadius:PropTypes.oneOfType([PropTypes.func,PropTypes.number]),// (radius) => num

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

import"core-js/modules/web.dom.iterable";import"core-js/modules/es6.array.iterator";import"core-js/modules/es6.object.keys";/* eslint no-param-reassign: 'off' */import callOrValue from"./callOrValue";export default function additionalProps(a,b){return Object.keys(a).reduce(function(c,d){return c[d]=callOrValue(a[d],b),c},{})}
/* eslint no-param-reassign: 'off' */import callOrValue from"./callOrValue";export default function additionalProps(a,b){return Object.keys(a).reduce(function(c,d){return c[d]=callOrValue(a[d],b),c},{})}

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

"use strict";exports.__esModule=!0,exports.default=RadialChart,exports.propTypes=void 0,require("core-js/modules/es6.object.assign");var _group=require("@vx/group"),_propTypes=_interopRequireDefault(require("prop-types")),_react=_interopRequireDefault(require("react")),_shared=require("@data-ui/shared");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var propTypes=Object.assign({},_shared.withTooltipPropTypes,{ariaLabel:_propTypes.default.string.isRequired,children:_propTypes.default.node.isRequired,width:_propTypes.default.number.isRequired,height:_propTypes.default.number.isRequired,margin:_propTypes.default.shape({top:_propTypes.default.number,right:_propTypes.default.number,bottom:_propTypes.default.number,left:_propTypes.default.number}),renderTooltip:_propTypes.default.func});exports.propTypes=propTypes;var defaultProps={margin:{top:10,left:10,right:10,bottom:10},renderTooltip:null},MIN_SIZE=10;function RadialChart(a){var b=a.renderTooltip;if(b)return _react.default.createElement(_shared.WithTooltip,{renderTooltip:b},_react.default.createElement(RadialChart,_extends({},a,{renderTooltip:null})));var c=a.ariaLabel,d=a.children,e=a.width,f=a.height,g=a.margin,h=a.onMouseMove,i=a.onMouseLeave,j=Object.assign({},defaultProps.margin,g),k=e-j.left-j.right,l=f-j.top-j.bottom,m=Math.min(k,l)/2;return k<MIN_SIZE||l<MIN_SIZE?null:_react.default.createElement("svg",{"aria-label":c,role:"img",width:e,height:f},_react.default.createElement(_group.Group,{top:f/2-j.top,left:e/2+g.left},_react.default.Children.map(d,function(a){return _react.default.cloneElement(a,{onMouseMove:a.props.onMouseMove||h,onMouseLeave:a.props.onMouseLeave||i,radius:m})})))}RadialChart.propTypes=propTypes,RadialChart.defaultProps=defaultProps,RadialChart.displayName="RadialChart";
"use strict";exports.__esModule=!0,exports.default=RadialChart,exports.propTypes=void 0;var _group=require("@vx/group"),_propTypes=_interopRequireDefault(require("prop-types")),_react=_interopRequireDefault(require("react")),_shared=require("@data-ui/shared");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var propTypes=_extends({},_shared.withTooltipPropTypes,{ariaLabel:_propTypes.default.string.isRequired,children:_propTypes.default.node.isRequired,width:_propTypes.default.number.isRequired,height:_propTypes.default.number.isRequired,margin:_propTypes.default.shape({top:_propTypes.default.number,right:_propTypes.default.number,bottom:_propTypes.default.number,left:_propTypes.default.number}),renderTooltip:_propTypes.default.func});exports.propTypes=propTypes;var defaultProps={margin:{top:10,left:10,right:10,bottom:10},renderTooltip:null},MIN_SIZE=10;function RadialChart(a){var b=a.renderTooltip;if(b)return _react.default.createElement(_shared.WithTooltip,{renderTooltip:b},_react.default.createElement(RadialChart,_extends({},a,{renderTooltip:null})));var c=a.ariaLabel,d=a.children,e=a.width,f=a.height,g=a.margin,h=a.onMouseMove,i=a.onMouseLeave,j=_extends({},defaultProps.margin,g),k=e-j.left-j.right,l=f-j.top-j.bottom,m=Math.min(k,l)/2;return k<MIN_SIZE||l<MIN_SIZE?null:_react.default.createElement("svg",{"aria-label":c,role:"img",width:e,height:f},_react.default.createElement(_group.Group,{top:f/2-j.top,left:e/2+g.left},_react.default.Children.map(d,function(a){return _react.default.cloneElement(a,{onMouseMove:a.props.onMouseMove||h,onMouseLeave:a.props.onMouseLeave||i,radius:m})})))}RadialChart.propTypes=propTypes,RadialChart.defaultProps=defaultProps,RadialChart.displayName="RadialChart";

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

"use strict";exports.__esModule=!0,exports.default=ArcLabel,require("core-js/modules/es6.object.assign"),require("core-js/modules/web.dom.iterable"),require("core-js/modules/es6.array.iterator"),require("core-js/modules/es6.object.keys");var _react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_theme=require("@data-ui/theme"),_additionalProps=_interopRequireDefault(require("../util/additionalProps"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}var baseLabel=_theme.svgLabel.baseLabel,propTypes={x:_propTypes.default.number,y:_propTypes.default.number,paintOrder:_propTypes.default.string,// eslint-disable-next-line react/forbid-prop-types
"use strict";exports.__esModule=!0,exports.default=ArcLabel;var _react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_theme=require("@data-ui/theme"),_additionalProps=_interopRequireDefault(require("../util/additionalProps"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}var baseLabel=_theme.svgLabel.baseLabel,propTypes={x:_propTypes.default.number,y:_propTypes.default.number,paintOrder:_propTypes.default.string,// eslint-disable-next-line react/forbid-prop-types
arc:_propTypes.default.object,// if passed, will be passed to any restprops
children:_propTypes.default.node},defaultProps={x:0,y:0,paintOrder:"stroke",arc:null,children:null};function ArcLabel(a){var b=a.x,c=a.y,d=a.children,e=a.arc,f=_objectWithoutPropertiesLoose(a,["x","y","children","arc"]);return _react.default.createElement("text",_extends({x:b,y:c},baseLabel,(0,_additionalProps.default)(f,e)),d)}ArcLabel.propTypes=propTypes,ArcLabel.defaultProps=defaultProps;

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

"use strict";exports.__esModule=!0,exports.default=ArcSeries,require("core-js/modules/es6.object.assign"),require("core-js/modules/web.dom.iterable"),require("core-js/modules/es6.array.iterator"),require("core-js/modules/es6.object.keys"),require("core-js/modules/es6.array.fill");var _shape=require("@vx/shape"),_react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_ArcLabel=_interopRequireDefault(require("../label/ArcLabel")),_callOrValue=_interopRequireDefault(require("../util/callOrValue")),_fillScaleFactory=require("../util/fillScaleFactory");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}var grayScale=(0,_fillScaleFactory.singleHueScaleFactory)(),propTypes={data:_propTypes.default.arrayOf(_propTypes.default.shape({label:_propTypes.default.string})).isRequired,pieValue:_propTypes.default.func.isRequired,// (d) => pie value
"use strict";exports.__esModule=!0,exports.default=ArcSeries;var _shape=require("@vx/shape"),_react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_ArcLabel=_interopRequireDefault(require("../label/ArcLabel")),_callOrValue=_interopRequireDefault(require("../util/callOrValue")),_fillScaleFactory=require("../util/fillScaleFactory");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],0<=b.indexOf(c)||(e[c]=a[c]);return e}var grayScale=(0,_fillScaleFactory.singleHueScaleFactory)(),propTypes={data:_propTypes.default.arrayOf(_propTypes.default.shape({label:_propTypes.default.string})).isRequired,pieValue:_propTypes.default.func.isRequired,// (d) => pie value
pieSort:_propTypes.default.func,radius:_propTypes.default.number,// likely passed by parent

@@ -3,0 +3,0 @@ innerRadius:_propTypes.default.oneOfType([_propTypes.default.func,_propTypes.default.number]),// (radius) => num

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

"use strict";var _callOrValue=_interopRequireDefault(require("./callOrValue"));exports.__esModule=!0,exports.default=additionalProps,require("core-js/modules/web.dom.iterable"),require("core-js/modules/es6.array.iterator"),require("core-js/modules/es6.object.keys");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}/* eslint no-param-reassign: 'off' */function additionalProps(a,b){return Object.keys(a).reduce(function(c,d){return c[d]=(0,_callOrValue.default)(a[d],b),c},{})}
"use strict";var _callOrValue=_interopRequireDefault(require("./callOrValue"));exports.__esModule=!0,exports.default=additionalProps;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}/* eslint no-param-reassign: 'off' */function additionalProps(a,b){return Object.keys(a).reduce(function(c,d){return c[d]=(0,_callOrValue.default)(a[d],b),c},{})}
{
"name": "@data-ui/radial-chart",
"version": "0.0.73",
"version": "0.0.74",
"description": "A package for radial-axis visualizations https://williaster.github.io/data-ui",

@@ -35,4 +35,4 @@ "sideEffects": false,

"dependencies": {
"@data-ui/shared": "^0.0.73",
"@data-ui/theme": "^0.0.73",
"@data-ui/shared": "^0.0.74",
"@data-ui/theme": "^0.0.74",
"@vx/event": "0.0.140",

@@ -46,3 +46,3 @@ "@vx/group": "0.0.140",

"devDependencies": {
"@data-ui/build-config": "^0.0.28",
"@data-ui/build-config": "^0.0.32",
"react": "^16.0.0",

@@ -74,3 +74,3 @@ "react-dom": "^16.0.0"

},
"gitHead": "f23385adaae8a1f7d422ee288dba0ca5540d71d3"
"gitHead": "1dff24fef34cf4dd9be10429b6f3a122ba7a62d1"
}
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