javascript - Using d3.js in Wix.com -
i want embed d3 visualizations wix.com website using add > html.
i found awesome geojson file of coordinates of chicago community areas need. perfect. http://www.chicagohealthatlas.org/map/healthcare_providers_dentists.json
so next step wanted achieve create script geodata in website make interactive map display information each community depending on 1 selected. however, wix.com not support d3, , receiving blank html text box. here code tried:
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> <script> var width= 960, height = 500; var path = d3.geo.path().projection(projection); var svg = d3.select("chicago_b&w.jpg").append("svg").attr("width",width).attr("height", height); d3.json("http://www.chicagohealthatlas.org/map/healthcare_providers_dentists.json", function(json)) { svg.selectall("path").data(json.features).enter().append("path").attr("d", path); var projection = d3.geo.mercator() .center([0, 5 ]) .scale(900) .rotate([-180,0]); var g = svg.append("g"); }); </script>
i think part of problem not using iframes. before that, way such thing? work if geodata in text file cannot connect wix server?
i appreciate help, quite lost.
also, chicago_b&w.jpg image have imported wix website , using on few pages.
Comments
Post a Comment