javascript

How to add a new chart type to dc.js

This is a step by step description of how I extended dc.js with a new chart type. It is inspired by a wiki page by Thomas Robert. A Bullet chart Mike Bostock already implemented a bullet chart in D3.js. The vertical version from Jason Davies uses the official code which is available as a d3-plugin. (I have submitted a proposal for a bug fix and will use it instead.

wiki of the future?

Last weekend I have been watching, reading and playing around with Ward Cunningham’s Smallest Federated Wiki. As usual he is a great designer and aims to simple, effective, understandable and useful tools! I particularly like the plugins idea (not new of course) and how easy it seems to be to add new ones, like support for MathJax: Get inspired you too!

syntax highlight

The following example shows how to syntax highligh some snippet of code in a very minimalistic way. I used it by symlinking to a file in the version control repo and name it in as the argument of $('#code-area').load() and here it is:

code higlighted with minimal javascript

Metacircular code highlighting The following code is an highlighted version of this very page using