Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple d3.js sample chart to get started

I have looking through all the chart examples on the d3.js site but it's too much complex to understand. All i want is to plot x axis and y axis and plot a json data like

{count:100,year:1999}
{count:240,year:2010}
{count:290,year:2009}

Count on x axis and year on y axis.Can any one provide a simple sample to get started.

like image 211
iJade Avatar asked Apr 20 '26 21:04

iJade


1 Answers

These two sandboxs are helpful for understanding d3 - http://phrogz.net/js/d3-playground/#VerticalBars_HTML (although some examples don't work anymore) and http://enjalot.com - Tributary.

Here is the start of a bar chart based on your data : http://enjalot.com/inlet/4125640/

like image 122
PhoebeB Avatar answered Apr 23 '26 11:04

PhoebeB