Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Document chart registry #676

Closed
gordonwoodhull opened this issue Aug 17, 2014 · 9 comments
Closed

Document chart registry #676

gordonwoodhull opened this issue Aug 17, 2014 · 9 comments
Labels
Milestone

Comments

@gordonwoodhull
Copy link
Contributor

The interface needed to add external charts to dc is quite minimal; looks like it's just render, redraw, filterAll.

Verify this and document the chart registry so that people know how to add external charts.

@gordonwoodhull gordonwoodhull added this to the v2.1 milestone Aug 17, 2014
@gordonwoodhull
Copy link
Contributor Author

@r4j4h
Copy link
Contributor

r4j4h commented Oct 13, 2014

There is also refocusAll

@r4j4h
Copy link
Contributor

r4j4h commented Oct 14, 2014

And if you want to participate in deregistering your chart you will need to provide a .anchorName() function that returns some kind of guid. I just generate a random integer with Math.random() * 1000000 << 0; in the constructor and save it as a member and I return that from my anchorName. Kind of a home-made _dcFlags identifier. Anything will work its just used as a key to remove it from the registry.

@brylie
Copy link

brylie commented Jul 29, 2015

Subscribing to progress updates, as this would help with issue #966.

@nsubordin81
Copy link

The stack overflow question and this page on issues have been really helpful. Would documenting the chart registry consist of a pull request to edit the docs files? Seems like what is included here encompasses the majority of the interface for chartRegistry, so it would be worthwhile to get it recorded somewhere central, I just wasn't sure if that was the process.

What I did with this info is 'dc-ify' a chart from one of my favorite other chart libraries, Chart.js. It didn't need zoom controls and I didn't add an unregister feature yet (I should), but it is implementing the render, redraw, and filterAll methods. https://github.com/nsubordin81/Chart.dc.js

@gordonwoodhull
Copy link
Contributor Author

Thanks @nsubordin81, yes that's all it would take.

I think I've gotten slightly distracted from this goal by #988 spinning off the chart registry, but we'll retain backward compatibility if we do that. And documentation will help the spin-off, as well as helping folks adapt other charts.

Thanks for the link to Chart.dc.js - once you're ready for people to use that, let's put a link to it somewhere. I'll check it out soon.

@nsubordin81
Copy link

Thanks @gordonwoodhull. I appreciate the backward compatibility, I'll hopefully be able to make this chart work with the generalized version as well later.

Thanks for the support, I only have the one chart right now which probably needs a lot of peer review and work, but I am willing to put it out there as a learning experience and to encourage other more experienced devs to help adapt the other chart.js charts and add features.

@gordonwoodhull
Copy link
Contributor Author

That would be great. I think it will help people for sure.

As for the previous question, I realize I misread. What this ticket requires is editing the comments in the source files. The documentation is generated from there.

Specifically, it means adding comments to this source file:
https://github.com/dc-js/dc.js/blob/develop/src/core.js

In case you're still interested in helping with that. 😁

@gordonwoodhull gordonwoodhull modified the milestones: v2.0, v2.1 Sep 12, 2015
r4j4h added a commit to r4j4h/dc.js that referenced this issue Jan 8, 2016
@gordonwoodhull
Copy link
Contributor Author

Fixed by #1082

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants