Open gordonwoon opened 8 years ago
@gordonwoon This is currently working for me. Must have gotten fixed in the last few months?
@gordonwoon I am running into the same problem (with react-d3-basic v. 1.6.11 and react-d3-tooltip v. 1.4.14). Did you ever find a solution?
@lizmallalieu nope, didn't work worked with regards to this library. i switched over to creating a pure d3js file and merge it with react components manually. D3js can handle animations much better than react-d3
@freethejazz Did you try that for react-d3-tooltip? I checked the commonProps.js and there's no showLegend property over there.
Hi. I have the same problem. Legend create every time and doesn't look at option legendShow. During create legend no one condition, just: _react2.default.createElement(_reactD3Core.Legend, this.props)
Maybe insert something like this (example for BarGroupTooltip): ` _createClass(BarGroupTooltip, [{ key: 'render', value: function render() { var _props = this.props; var width = _props.width; var height = _props.height;
var showLegend = _props.showLegend;
var legend = null;
if (showLegend) {
legend = _react2.default.createElement(_reactD3Core.Legend, this.props);
}
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(
_tooltip2.default,
_extends({}, this.props, this.state),
this.props.children
),
legend,
_react2.default.createElement(
_reactD3Shape.Chart,
_extends({}, this.props, this.state),
_react2.default.createElement(_barGroup2.default, _extends({}, this.props, this.state, {
onMouseOver: this.mouseOver.bind(this),
onMouseOut: this.mouseOut.bind(this)
}))
)
);}}]);`
I apply it and it's working for me. Can you commit something like it?
@samuel-halim95 You're absolutely right. Not sure how I mixed up repositories when posting this comment. I'm going to edit my original comment so people don't get thrown off.
I am trying to hide the legend as my data is pretty huge and it occupies half of the container. Are there any other ways to disable it?