react-d3-core
Advanced tools
Comparing version 0.7.2 to 0.8.0
@@ -9,4 +9,4 @@ "use strict"; | ||
height: 500, | ||
margins: { top: 50, right: 50, bottom: 50, left: 50 } | ||
margins: { top: 80, right: 100, bottom: 80, left: 100 } | ||
}; | ||
module.exports = exports["default"]; |
@@ -140,3 +140,3 @@ "use strict"; | ||
gridAxisClassName: _react.PropTypes.string, | ||
x: _react.PropTypes.func.isRequired, | ||
x: _react.PropTypes.func, | ||
xDomain: _react.PropTypes.array, | ||
@@ -146,3 +146,3 @@ xRange: _react.PropTypes.array, | ||
xRangeRoundBands: _react.PropTypes.object, | ||
y: _react.PropTypes.func.isRequired, | ||
y: _react.PropTypes.func, | ||
yDomain: _react.PropTypes.array, | ||
@@ -149,0 +149,0 @@ yRange: _react.PropTypes.array, |
@@ -82,3 +82,3 @@ "use strict"; | ||
// make legends | ||
var legend = legendArea.selectAll('div').data(series).enter().append("div").attr("class", legendClassName + ' legend').style("width", 120).style("height", 30).style("padding", 5).style("float", legendPosition); | ||
var legend = legendArea.selectAll('div').data(series).enter().append("div").attr("class", legendClassName + ' legend').style("width", 120).style("height", 30).style("padding", 5).style("background-color", '#EEE').style("display", "inline-block"); | ||
@@ -89,3 +89,3 @@ var rect = legend.append("div").style("width", 18).style("height", 18).style("background-color", function (d) { | ||
var text = legend.append("span").style("width", 92).style("padding-left", 5).style("padding-right", 5).text(function (d) { | ||
var text = legend.append("div").style("width", 92).style("padding-left", 5).style("padding-right", 5).text(function (d) { | ||
return d.name; | ||
@@ -99,3 +99,6 @@ }).style("float", legendPosition); | ||
value: function render() { | ||
var legendClassName = this.props.legendClassName; | ||
var _props2 = this.props; | ||
var legendClassName = _props2.legendClassName; | ||
var width = _props2.width; | ||
var height = _props2.height; | ||
@@ -106,2 +109,5 @@ var legendGroup = _reactFauxDom2['default'].createElement('div'); | ||
legendGroup.setAttribute('class', legendClasses); | ||
legendGroup.style.width = width; | ||
legendGroup.style.height = height; | ||
legendGroup.style.textAlign = 'center'; | ||
@@ -108,0 +114,0 @@ var legendDom = this._mkLegend(legendGroup); |
{ | ||
"name": "react-d3-core", | ||
"version": "0.7.2", | ||
"version": "0.8.0", | ||
"description": "react-d3 chart core component", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -6,3 +6,3 @@ "use strict"; | ||
height: 500, | ||
margins: {top: 50, right: 50, bottom: 50, left: 50} | ||
margins: {top: 80, right: 100, bottom: 80, left: 100} | ||
} |
@@ -33,3 +33,3 @@ "use strict"; | ||
gridAxisClassName: PropTypes.string, | ||
x: PropTypes.func.isRequired, | ||
x: PropTypes.func, | ||
xDomain: PropTypes.array, | ||
@@ -39,3 +39,3 @@ xRange: PropTypes.array, | ||
xRangeRoundBands: PropTypes.object, | ||
y: PropTypes.func.isRequired, | ||
y: PropTypes.func, | ||
yDomain: PropTypes.array, | ||
@@ -42,0 +42,0 @@ yRange: PropTypes.array, |
@@ -90,3 +90,4 @@ "use strict"; | ||
.style("padding", 5) | ||
.style("float", legendPosition); | ||
.style("background-color", '#EEE') | ||
.style("display", "inline-block"); | ||
@@ -99,3 +100,3 @@ var rect = legend.append("div") | ||
var text = legend.append("span") | ||
var text = legend.append("div") | ||
.style("width", 92) | ||
@@ -114,3 +115,5 @@ .style("padding-left", 5) | ||
const { | ||
legendClassName | ||
legendClassName, | ||
width, | ||
height | ||
} = this.props; | ||
@@ -122,2 +125,5 @@ | ||
legendGroup.setAttribute('class', legendClasses); | ||
legendGroup.style.width = width; | ||
legendGroup.style.height = height; | ||
legendGroup.style.textAlign = 'center'; | ||
@@ -124,0 +130,0 @@ var legendDom = this._mkLegend(legendGroup); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4169095
32177