Skip to content
forked from sergeyt/d3-gems

Collection of reusable widgets powered by d3.js

License

Notifications You must be signed in to change notification settings

xgrommx/d3-gems

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

d3-gems

NPM version Build Status Deps Status

NPM

Collection of reusable widgets powered by d3.js

JavaScript Example

Sample code below shows how to render chart.

// first write/generate chart definition
var column_chart = {
	type: "column",
	axes: {
		x: {majorTicks: "outside"},
		y: {
			majorTicks: "outside",
			scalar: true,
			margin: true,
			grid: { major: true, minor: false }
		}
	},
	categories: ["A", "B", "A"],
	series: {
		Revenue: [90, 70, 95],
		Units: [30, 25, 27]
	},
	title: {
		text: "Test Chart",
		position: "center"
	},
	legend: {
		position: "topright"
	}
};

// then render chart
$(function(){
	$('.chart')
		.data('chart', column_chart)
		.chart();
});

See also examples at demo folder.

About

Collection of reusable widgets powered by d3.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published