d3.js - d3.scale doesn't work when offline? -


this doesn't work offline, works fine when internet connection available :

<!doctype html> <html> <head>   <title>d3 svg barchart</title>     <script src="http://d3js.org/d3.v3.min.js"></script><!--line a-->     <script src="d3.js"></script>            <script src="d3.min.js"></script> </head> <body>     <script>     var dataarray = [20, 40, 50, 60];     var width=500;     var height=500;      var canvas = d3.select("body")               .append("svg")               .attr("width", width)               .attr("height", height);      var widthscale = d3.scale.linear()                      .domain([0, 60])                      .range([0, width]);      var bars = canvas.selectall("rect")                 .data(dataarray)                 .enter()                     .append("rect")                     .attr("width", function(d){                                     return widthscale(d);                                 })                     .attr("height", 50)                     .attr("y", function(d, i){                                 return i*100;                         });     </script> </body> </html> 

it seems scale operation(s) of d3.js library doesn't work when i'm offline (or when line in put in comment block), why? there d3.js version works offline user?

i enjoy snap.svg practices offline (i don't have private internet connection available), there way d3.js?

your problem here

    <script src="http://d3js.org/d3.v3.min.js"></script><!--line a-->     <script src="d3.js"></script>            <script src="d3.min.js"></script> 

download

    <script src="http://d3js.org/d3.v3.min.js"></script> 

refer correctly locally , remove:

    <script src="d3.js"></script>            <script src="d3.min.js"></script> 

Comments