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

Incorporate mg-line-brushing extension directly into metricsgraphics #790

Open
wlach opened this issue Jan 11, 2018 · 12 comments
Open

Incorporate mg-line-brushing extension directly into metricsgraphics #790

wlach opened this issue Jan 11, 2018 · 12 comments
Milestone

Comments

@wlach
Copy link
Collaborator

wlach commented Jan 11, 2018

@dandehavilland wrote a great extension to metrics graphics that lets you brush through line charts and get an expanded view of them. You can see an example of it in action on the current metricsgraphics site:

https://www.metricsgraphicsjs.org/examples.htm#addons

Unfortunately for those of us installing metricsgraphics via npm, this package is not there. I think it likely makes sense to incorporate this directly into metricsgraphics itself, as I would consider this core functionality for a useful charting library.

@wlach wlach added this to the v2.13 milestone Jan 11, 2018
@dandehavilland
Copy link
Contributor

That's already available via npm: https://www.npmjs.com/package/mg-line-brushing

I just verified that npm i mg-line-brushing works for me.

@wlach
Copy link
Collaborator Author

wlach commented Jan 11, 2018

Oh that's great. Longer term, what do you think about including this plugin in metricsgraphics itself?

@wlach
Copy link
Collaborator Author

wlach commented Jan 11, 2018

Part of my rationale is that I eventually want to support more sophisticated types of brushing, along with zooming -- and I think this will be easier to implement inside metricsgraphics itself.

@dandehavilland
Copy link
Contributor

Yeah, I'd be glad for it to become a part of MG proper. It's been dormant for a while so it'll no doubt need some tweaking. 👍

@hamilton
Copy link
Collaborator

All for this.

@shikhar-scs
Copy link
Contributor

shikhar-scs commented Feb 1, 2018

@wlach Can I work on this issue under your guidance please ?

@wlach
Copy link
Collaborator Author

wlach commented Feb 2, 2018

@shikhar-scs absolutely! that would be great if you wanted to take this up.

@shikhar-scs
Copy link
Contributor

Yeah sure. If you could provide me with a starting point, that would be great 😊

@wlach
Copy link
Collaborator Author

wlach commented Feb 2, 2018

I think we're just going to move the code that's currently in the plugin inline into metricsgraphics. Probably the best way to start is to look at the plugin source https://github.com/dandehavilland/mg-line-brushing/blob/master/src/js/hooks.js and try to create a mental model of how it works. From there, it should be possible to come with a strategy on how to integrate it. If you get stuck, let me know and I can provide some hints.

@shikhar-scs
Copy link
Contributor

Ok @wlach I'll get started with this .

If you get stuck, let me know and I can provide some hints.

Yeah sure 👍

@shikhar-scs
Copy link
Contributor

@wlach I guess I have solved the problem. I'll soon file a PR for the same

@cnwangjie
Copy link
Contributor

I submitted a pull request #851 with my attempt and some of my questions. Can you take a look and give me some advice? @wlach

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

5 participants