marmelab / EventDrops

A time based / event series interactive visualization using d3.js

Home Page:http://marmelab.com/EventDrops/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVG elements instead of div with event-drops does not show properly in the UI

malishahi opened this issue · comments

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>

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. :)