SVG elements instead of div with event-drops does not show properly in the UI
malishahi opened this issue · comments
Mehdi Sheikhalishahi commented
SVG elements instead of div with event-drops does not show properly in the UI.
I get the following error in console
Error: attribute width: A negative value is not valid. ("-20")
Part of the render code:
<svg ref={node => this.containerNode = d3.select(node)} height={this.props.height} width="100%">
<g ref={node => this.eventElem = d3.select(node)} />
<div ref={node => this.tooltipNode = d3.select(node)} />
</svg>
Jonathan Petitcolas commented
EventDrops adds an SVG on its side. Hence, it wouldn't work if you call it on an existing svg
element. Can't you use a div
instead?
As it is (in my opinion at least) not a big deal to add an extra div
to your chart, I am closing the issue. :)