alecperkins/active-markdown — pull request #3 by alecperkins (2013-04-13 16:44:33+00:00)
Title: Integrate d3.js

Active Markdown would become extremely useful if there was a simple way to integrate charts and other figures that could be altered the same way text output is now. D3.js seems to be the obvious candidate to fill such a role, as it's a battle-tested, versatile, popular library that many developers are already familiar with.

Some objections I can see people raising to D3's integration:

- Size of the library:

At 140kb for the minified version, it's larger than any of the current source files, but a single image is still larger than that. I don't think this is too much of an issue.

- Complicated API

This is a bit of a problem - the API is not optimal for something like Active Markdown. Some wrappers or helpers may be in order, and we may want to add the ability to have boilerplate code that isn't shown in the main document (not sure if this is already there or not).

- Off topic

Active Markdown is a tool for creating reactive documents. Charts seem like an excellent and powerful addition - it seems very on topic to me, but I understand that others may see it differently.

If I can find the time, I'll try to prepare a pull request that implements the integration. It shouldn't be terribly difficult, but if the consensus is that it's a bad idea, I probably won't bother.