Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redraw issues when passed empty set of data #29

Closed
dule opened this issue Nov 22, 2013 · 4 comments
Closed

Redraw issues when passed empty set of data #29

dule opened this issue Nov 22, 2013 · 4 comments
Labels

Comments

@dule
Copy link
Contributor

dule commented Nov 22, 2013

Somewhat related to #28; if a graph is being redrawn, and if there's no data in the new set of data, the old svg line remains:
http://jsfiddle.net/Cx8aW/4/

And in contrast, if there's no data in the original set, the graph won't get drawn if the new set of data contains data:
http://jsfiddle.net/Cx8aW/5/

@johnkiernander
Copy link
Member

You're really kicking the tyres tonight :)

@brisbink
Copy link

Is there a workaround for this issue? When I try to remove a series from a line chart, the line remains on the graph even when there is no data for that series. Thanks!

@dule
Copy link
Contributor Author

dule commented Feb 27, 2014

One workaround is to select them with d3 and remove the elements manually before you redraw:
e.g., d3.selectAll($('svg circle').toArray()).remove()

@johnkiernander
Copy link
Member

Fixed v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants