I'm new on d3,and I'm trying to create a time scale on the x-axis starting from this csv file
Anno,Italia
2003,46.9
2004,46.3
2005,54.0
2006,56.7
2007,56.9
2008,58.1
2009,59.0
2010,61.3
2011,62.6
2012,64.5
2013,67.2
but when I apply the d3.time.scale(),I get on the x-axis values such as .003,.004.What can I do to obtain 2003,2004 etc. on the axis?Here's my code :
var xScale = d3.time.scale().range([0,width]);
d3.csv("resources/diffusionesitiweb10anni.csv",function(data){
dataset = data;
xScale.domain(d3.extent(data,function(d){
return d["Anno"];
}));
Thanks in advance ! :)