When calling setData, only destroy the vis if the type has changed.

Although Issue #32 is closed, the bug is still present. Only destroying the vis if the type has changed fixed the issue for me.