dygraphs working for switched datasets