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

react-vis

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-vis - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

52

dist/plot/axis/axis.js

@@ -72,28 +72,30 @@ 'use strict';

var propTypes = {
orientation: _react2.default.PropTypes.oneOf([LEFT, RIGHT, TOP, BOTTOM]),
attr: _react2.default.PropTypes.string.isRequired,
width: _react2.default.PropTypes.number,
height: _react2.default.PropTypes.number,
top: _react2.default.PropTypes.number,
left: _react2.default.PropTypes.number,
title: _react2.default.PropTypes.string,
orientation: _react.PropTypes.oneOf([LEFT, RIGHT, TOP, BOTTOM]),
attr: _react.PropTypes.string.isRequired,
width: _react.PropTypes.number,
height: _react.PropTypes.number,
top: _react.PropTypes.number,
left: _react.PropTypes.number,
title: _react.PropTypes.string,
className: _react2.default.PropTypes.string,
tickLabelAngle: _react2.default.PropTypes.number,
tickSize: _react2.default.PropTypes.number,
tickSizeInner: _react2.default.PropTypes.number,
tickSizeOuter: _react2.default.PropTypes.number,
tickPadding: _react2.default.PropTypes.number,
tickValues: _react2.default.PropTypes.array,
tickFormat: _react2.default.PropTypes.func,
tickTotal: _react2.default.PropTypes.number,
className: _react.PropTypes.string,
hideTicks: _react.PropTypes.bool,
hideLine: _react.PropTypes.bool,
tickLabelAngle: _react.PropTypes.number,
tickSize: _react.PropTypes.number,
tickSizeInner: _react.PropTypes.number,
tickSizeOuter: _react.PropTypes.number,
tickPadding: _react.PropTypes.number,
tickValues: _react.PropTypes.array,
tickFormat: _react.PropTypes.func,
tickTotal: _react.PropTypes.number,
// Not expected to be used by the users.
// TODO: Add underscore to these properties later.
marginTop: _react2.default.PropTypes.number,
marginBottom: _react2.default.PropTypes.number,
marginLeft: _react2.default.PropTypes.number,
marginRight: _react2.default.PropTypes.number,
innerWidth: _react2.default.PropTypes.number,
innerHeight: _react2.default.PropTypes.number
marginTop: _react.PropTypes.number,
marginBottom: _react.PropTypes.number,
marginLeft: _react.PropTypes.number,
marginRight: _react.PropTypes.number,
innerWidth: _react.PropTypes.number,
innerHeight: _react.PropTypes.number
};

@@ -191,2 +193,4 @@

height = props.height,
hideLine = props.hideLine,
hideTicks = props.hideTicks,
left = props.left,

@@ -205,7 +209,7 @@ orientation = props.orientation,

className: predefinedClassName + ' ' + axisClassName + ' ' + className },
_react2.default.createElement(_axisLine2.default, {
!hideLine && _react2.default.createElement(_axisLine2.default, {
height: height,
width: width,
orientation: orientation }),
_react2.default.createElement(_axisTicks2.default, props),
!hideTicks && _react2.default.createElement(_axisTicks2.default, props),
title ? _react2.default.createElement(_axisTitle2.default, {

@@ -212,0 +216,0 @@ title: title,

@@ -62,3 +62,3 @@ 'use strict';

var TREEMAP_LAYOUT_MODES = ['circlePack'];
var TREEMAP_LAYOUT_MODES = ['circlePack', 'partition', 'partition-pivot'];

@@ -165,5 +165,23 @@ var NOOP = function NOOP(d) {

if (data && (mode === 'partition' || mode === 'partition-pivot')) {
var partitionFunction = (0, _d3Hierarchy.partition)().size([width, height]).padding(padding);
var structuredInput = (0, _d3Hierarchy.hierarchy)(data).sum(function (d) {
return d.size;
});
var mappedNodes = partitionFunction(structuredInput).descendants();
if (mode === 'partition-pivot') {
return mappedNodes.map(function (node) {
return _extends({}, node, {
x0: node.y0,
x1: node.y1,
y0: node.x0,
y1: node.x1
});
});
}
return mappedNodes;
}
if (data && mode === 'circlePack') {
var packingFunction = (0, _d3Hierarchy.pack)().size([width, height]).padding(padding);
var structuredInput = (0, _d3Hierarchy.hierarchy)(data).sort(function (a, b) {
var _structuredInput = (0, _d3Hierarchy.hierarchy)(data).sort(function (a, b) {
return a.size - b.size;

@@ -173,3 +191,3 @@ }).sum(function (d) {

});
return packingFunction(structuredInput).descendants();
return packingFunction(_structuredInput).descendants();
}

@@ -179,3 +197,3 @@ if (data) {

var treemapingFunction = (0, _d3Hierarchy.treemap)(tileFn).tile(tileFn).size([width, height]).padding(padding);
var _structuredInput = (0, _d3Hierarchy.hierarchy)(data).sort(function (a, b) {
var _structuredInput2 = (0, _d3Hierarchy.hierarchy)(data).sort(function (a, b) {
return a.size - b.size;

@@ -186,3 +204,3 @@ }).sum(function (d) {

return treemapingFunction(_structuredInput).descendants();
return treemapingFunction(_structuredInput2).descendants();
}

@@ -189,0 +207,0 @@ return [];

@@ -244,3 +244,3 @@ 'use strict';

domain: [],
range: [],
range: [value],
distance: 0,

@@ -247,0 +247,0 @@ attr: attr,

{
"name": "react-vis",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "Visualization Team <visualization@uber.com>",

@@ -38,2 +38,17 @@ <p align="right">

## Breaking changes
We recently made a major jump to version v1, which naturally includes some breaking changes. Specifically these include
*Table is deprecated*: There are other substantially better tables in the ecosystem, so we decided to stick to what we do best, charts and plots.
*Stylesheet has been moved*: the stylesheet for react-vis can now be found within the dist folder, so simply modify your style import to be:
```
@import './node_modules/react-vis/dist/main';
```
*Default Opacity*: The default opacity behavior has been modified. Previously, react-vis asserted you had a linear scale with range [0.1, 1] and place your value within that range. Now react-vis presents a literal-scale by default. Check your opacities to make sure they are correct.
*tickSizeInner & tickSizeOuter have been reversed*: the names of these props on the axes component have been switched. We feel this arrangement offers a more natural way to interact with the plot.
*ALIGN.TOP_RIGHT was removed from hint.js*: this case did not match the orientation scheme followed by this component so was removed.
## Usage

@@ -40,0 +55,0 @@

Sorry, the diff of this file is not supported yet

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