Javascript d3.未使用express定义比例
我正在尝试使用node.js和express在我的web应用程序中绑定c3图表。但是c3.js文件给出了以下错误消息:Javascript d3.未使用express定义比例,javascript,node.js,express,c3.js,Javascript,Node.js,Express,C3.js,我正在尝试使用node.js和express在我的web应用程序中绑定c3图表。但是c3.js文件给出了以下错误消息: TypeError: d3.scale is undefined 下面是我的layout.yade文件: doctype html html head title= title link(rel='stylesheet', href='http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css') lin
TypeError: d3.scale is undefined
下面是我的layout.yade文件:
doctype html
html
head
title= title
link(rel='stylesheet', href='http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css')
link(rel='stylesheet', href='/stylesheets/c3.css')
link(rel='stylesheet', href='/stylesheets/style.css')
script(src='http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js')
script(src='/javascripts/leaflet.ajax.js')
script(src='http://d3js.org/d3.v3.min.js')
script(src='/javascripts/c3.min.js')
script(src='/javascripts/jquery.js')
body
block content
我解决了这个问题,对于那些在下面有同样问题的人,你可以找到正确的顺序和正确版本的图书馆:
doctype html
html
head
title= title
link(rel='stylesheet', href='http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css')
link(rel='stylesheet', href='/stylesheet/c3.css')
link(rel='stylesheet', href='/stylesheets/style.css')
script(src='http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js')
script(src='/javascripts/c3.min.js')
script(src='/javascripts/leaflet.ajax.js')
script(src='http://d3js.org/d3.v3.min.js' charset='utf-8')
script(src='/javascripts/jquery.js')
body
block content