Bullet Layout
This example shows a bullet chart layout displaying five metrics—Revenue, Profit, Order Size, New Customers, and Satisfaction—each with ranges, measures, and markers. Titles and subtitles are editable in place via SVG foreignObject elements containing XHTML forms, with blur and keypress handlers updating the underlying data. The charts animate transitions when a button randomizes the values, using d3.scale.linear, transition durations, and the bulletChart function from d3.v2. Data is loaded from a JSON file and rendered as SVG.
AI-generated descriptionExperiment �� <a href="http://bl.ocks.org/2653600" title="view this gist via bl.ocks.org">?</a> <a href="http://bl.ocks.org/GerHobbelt" title="view a list of all my gists at bl.ocks.org">8</a>
- Editable -> SVG foreignObject + XHTML
Showcases using a SVG foreignObject to contruct temporary, minimal forms to allow editing of arbitrary D3 data (in this case: titles and subtitles)
** Notes
The code isn't the cleanest that could be: the 'blur' and 'keypress' event handlers share copy&pasted code which could be refactored.