All examples By author By category About

geoffreyammons

A dynamic, reusable donut chart for D3.js v4

This is the follow-on from my last bl.ock which was a static version of a donut chart, using D3 version 4.

The example presented here is an updateable version. I wanted to make and share this as it is also in a reusable form.

My reasoning behind putting this out there is that I came across a lot of examples of dynamic donut charts, but none seemed to be in a reusable format, which is the format I feel is best.

So this is a result of my learning process, which was aided by those mentioned in the last bl.ock.

The reusability components for this chart we in large part due to the great tutorial by Rob Moore: Towards Updatable D3.js Charts.

The data presented in this chart is from an experiment run by some people in my lab at PoreCamp Australia 2017. It is a mixed sample of bacteria as analysed by our Nanopore Sequence Aanalysis package japsa.

For more information, or to suggest some fixes/improvements to this chart, find me on GitHub.

Previous: Static, reusable chart.