Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bar
doc
donut
lib
line
.gitignore
LICENSE
README.md

README.md

#Design Concept

  1. A collection of common chart based on d3.js
  2. Following Mike Bostock's Reusable Chart pattern
  3. Responsive using SVG viewbox
  4. Entering Animation
  5. Flexible (the following clock is built using settimeinterval with donut chart)

clock

#Example Bar Chart

See it in action

	data = [
		{"key": '彰化碧峰里', "value": 	43}
		{"key": '花蓮森榮里', "value": 	41}
		{"key": '南投光明里', "value": 	41}
		{"key": '台灣平均', "value": 	12}
		{"key": '新竹東平里', "value": 	2}
		{"key": '新竹關新里', "value": 2}
		{"key": '新竹大鵬里', "value": 2}
	]

	firstBar = barChart!
		.data data
		.container '#bar' ### the container where to init the bar chart
		.barHeight 25


	firstBar! ### call this when page init, so that the svg is being initiated, and the space is saved


	firstBar.draw! ### when user actually scroll to the viewport, then start entering animation
You can’t perform that action at this time.