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

react-d3-core

Package Overview
Dependencies
Maintainers
1
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 0.0.6 to 0.0.7

2

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

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

@@ -15,3 +15,17 @@ "use strict";

componentDidMount () {
static defaultProps = {
setScale: (type, func) => {},
range: null,
rangeRoundBands: null,
domain: null,
tickFormat: null,
tickOrient: null
}
componentDidMount() {
this._mkAxis();
}
_mkAxis() {
console.log('here')
const {showAxis, type} = this.props;

@@ -35,7 +49,5 @@

_mkTickAxis () {
const {
type,
initAxis,
orient,

@@ -53,3 +65,3 @@ tickOrient,

var func = initAxis;
var func = d3.svg.axis();

@@ -84,2 +96,3 @@ func.scale(this._mkScale());

scale,
newDomain
} = this.props;

@@ -112,3 +125,3 @@

if(type === 'x' || type === 'y') {
if((type === 'x' || type === 'y') && !newDomain) {
// if x, y set scale, not grid

@@ -150,4 +163,14 @@ this.props.setScale(type, func);

componentWillReceiveProps(nextProps) {
const {
newDomain
} = nextProps;
this.props = nextProps;
if(newDomain) {
this._mkAxis();
}
}
render () {

@@ -171,11 +194,1 @@ const {gridAxisClassName, axisClassName, t, type} = this.props;

}
Axis.defaultProps = {
initAxis: d3.svg.axis(),
setScale: (type, func) => {},
range: null,
rangeRoundBands: null,
domain: null,
tickFormat: null,
tickOrient: null
};

@@ -63,2 +63,3 @@ "use strict"

xDomain,
xDomainSet,
xRange,

@@ -115,2 +116,3 @@ xRangeRoundBands,

domain = {xDomain}
newDomain = {xDomainSet}
range = {xRange}

@@ -117,0 +119,0 @@ scale = {xScale}

@@ -29,2 +29,3 @@ "use strict"

yDomain,
yDomainSet,
yRange,

@@ -82,2 +83,3 @@ yRangeRoundBands,

domain = {yDomain}
newDomain = {yDomainSet}
range = {yRange}

@@ -84,0 +86,0 @@ scale = {yScale}

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