Creating bar chart.

17 views
Skip to first unread message

Jenisha Thankaraj

unread,
Apr 21, 2014, 11:59:04 PM4/21/14
to d3...@googlegroups.com
I need to draw chart using d2js. My data is json format.
 var jsonData=[{
     "auCount":27,
     "auDate": "2014-03-03"
     },
     {
     "auCount":81 ,
     "auDate": "2014-03-13"
         }];

I need auDate in X axis and auCount in Y-axis. When I tried X-axis scale pointing wrongly.

I tried

var x = d3.time.scale()                  
            .domain([new Date(jsonData[0].auDate), new Date(jsonData[jsonData.length-1].auDate)])                  
            .range([0, width - margin.left - margin.right]);


Reply all
Reply to author
Forward
0 new messages