better api and more testing for ggplotly