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

react-d3-core

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-d3-core - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

48

lib/container/svg.js

@@ -45,48 +45,12 @@ "use strict";

_createClass(ChartSvg, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _this = this;
key: 'render',
value: function render() {
var _props = this.props;
var height = _props.height;
var width = _props.width;
var margins = _props.margins;
var xScale = _props.xScale;
var xDomain = _props.xDomain;
var xRange = _props.xRange;
var xScaleSet = _props.xScaleSet;
var yScaleSet = _props.yScaleSet;
var onZoom = _props.onZoom;
var scaleExtent = _props.scaleExtent;
var svgClassName = _props.svgClassName;
var id = _props.id;
var children = _props.children;
// implement zoom if xscale and y scale is set!
if (xScaleSet && yScaleSet) {
if (xScale === 'ordinal') {
// if ordinal tramsform to linear
xScaleSet = (0, _utilsScale.scale)({
scale: 'linear',
domain: [0, width - margins.left - margins.right],
range: [0, width - margins.left - margins.right]
});
}
var zoom = _d32['default'].behavior.zoom().x(xScaleSet).y(yScaleSet).scaleExtent(scaleExtent);
zoom.on("zoom", function () {
onZoom.call(_this, xScaleSet, yScaleSet, zoom);
});
_d32['default'].select(_reactDom2['default'].findDOMNode(this.refs.svgContainer)).call(zoom);
}
}
}, {
key: 'render',
value: function render() {
var _props2 = this.props;
var height = _props2.height;
var width = _props2.width;
var margins = _props2.margins;
var svgClassName = _props2.svgClassName;
var id = _props2.id;
var children = _props2.children;
var t = 'translate(' + margins.left + ', ' + margins.top + ')';

@@ -93,0 +57,0 @@

2

package.json
{
"name": "react-d3-core",
"version": "1.0.9",
"version": "1.0.10",
"description": "react-d3 chart core component",

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

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