An analog clock implementation in d3.
I borrowed some ideas from:
- https://github.com/wout/svg.clock.js
- https://ericbullington.com/blog/2012/10/27/d3-oclock/
- http://www.infocaptor.com/dashboard/d3-javascript-visualization-to-build-world-analog-clocks
Usage:
Call d3clock(config) for each clock instance
eg:
d3clock({
target:'#chart1',
face:'modern',
width:1000,
// date:'Mon May 25 2015 10:09:37',
TZOffset:{
hours:0
}
});
You can create several instances in a page (for showing multiple time zones, for example)
If you send a date value in the config object, it shows a fixed time (good for testing)
- sbb: The famous Swiss Railway Clock
- modern: A somewhat modern/minimalist face
- braun: A Braun BN0021-ish face