javascript - D3.js chord diagram: when uploading, error "can't find variable: d3" -
i have been working on chord diagram using d3.js. when connecting local server (using brackets live preview) diagram works fine. tried upload github , following error , warning messages in console:
[warning] [blocked] page @ (my github gh-page) not allowed run insecure content http://d3js.org/d3.v2.min.js?2.8.1.
[warning] [blocked] page @ (my github gh-page) not allowed run insecure content http://fonts.googleapis.com/css?family=pt+serif|pt+serif:b|pt+serif:i|pt+sans|pt+sans:b.
[error] referenceerror: can't find variable: d3 global code (financial-flows:68)
i saw others faced similar problems , suggested add local script of d3.js in case couldn't accessed reason. did (at least think did: copied file, saved .js file in folder, , added script line in index). sill doesn't work. idea problem may be? error message come in line "var formatpercent = d3.format(".1%");"
<script src="http://d3js.org/d3.v2.min.js?2.8.1" charset="utf-8"></script> <script src="d3.min.js"></script>
var width = 1020, height = 1020, outerradius = math.min(width, height) / 4 - 10, innerradius = outerradius - 24; var formatpercent = d3.format(".1%"); var arc = d3.svg.arc() .innerradius(innerradius) .outerradius(outerradius);
Comments
Post a Comment