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

Discussion on using plotly #34

Open
IshaGupta18 opened this issue Jun 7, 2019 · 13 comments
Open

Discussion on using plotly #34

IshaGupta18 opened this issue Jun 7, 2019 · 13 comments

Comments

@IshaGupta18
Copy link
Collaborator

@jywarren @namangupta01 @Souravirus @IgorWilbert @gauravano do you think it will be a good idea to switch to plotly instead of chart.js because of its better UI, zooming, panning here
https://plot.ly/javascript/
This might ease us out on a lot of stuff for us with a better range of features. What do you all think?

@IshaGupta18 IshaGupta18 added the enhancement New feature or request label Jun 7, 2019
@namangupta01
Copy link
Member

Yes, this new chat looks nice and also provide various inbuilt functionality. Like download as image, zooming and all. It looks good. But we should consider all aspects before moving to this one. Let's take what others think about it. In the meantime, I am exploring more about this Plotly.

@IshaGupta18
Copy link
Collaborator Author

Yes! I think it has great functionality but let's see if it doesn't harm any of the other functioning. I am exploring this one too and if we get an upvote for it, we will shift to it!

@IshaGupta18
Copy link
Collaborator Author

@Souravirus agreed with this on #31. What do the others think about this?

@IgorWilbert
Copy link
Member

IgorWilbert commented Jun 10, 2019

@IshaGupta18 good find! I guess the replace depends on what people want for the project. Using plotly may save us work since they have so many different types of graphs ready to use. However, we would lose a bit of flexibility to make custom graphs, essentially just applying those types. Since I think your end goal is to work on CSV compatibility, I vote for plotly, as long as you don't lose much of what you already did.

@jywarren
Copy link
Member

Hi! If you want to abstract the display portion of the library, you can plan to make it possible to hand data off to either library using an adaptor function. Like, the standard data could go out to display(chartLib, data) where chartLib is either chart.js or Plotly.... could that work?

@IshaGupta18
Copy link
Collaborator Author

IshaGupta18 commented Jun 11, 2019 via email

@IshaGupta18
Copy link
Collaborator Author

@IshaGupta18
Copy link
Collaborator Author

So any conclusion we may have drawn out on this one? @jywarren what do you think?

@jywarren
Copy link
Member

Hi @IshaGupta18 - to be honest, i trust you to make the call! What I would do is think about what is the common API a swappable generic graph library would need. Would it be:

  1. grapher.load(data) => accepts data
  2. grapher.render(element) => generates HTML
  3. grapher.update(data) => updates HTML
  4. ...?

This kind of approach helps design any component in your system. And, the input/output of each of these methods could be testable too.

@IshaGupta18
Copy link
Collaborator Author

Yes agreed. I'll try to structure the code accordingly. I'll keep you posted on how I will be going about it!

@IshaGupta18
Copy link
Collaborator Author

@jywarren I have implemented plotly in our project, I will be pushing the code in the adopter function form you suggested.

Here's a gif of how it works and a couple of images!

plotly
image
image
image

We can easily shift between the 2 libraries, and I will show you the code to make it more clear! What do you think?

cc @namangupta01 @IgorWilbert @gauravano @Souravirus

@jywarren
Copy link
Member

jywarren commented Jun 20, 2019 via email

@IshaGupta18
Copy link
Collaborator Author

IshaGupta18 commented Jun 20, 2019 via email

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

No branches or pull requests

4 participants