2017-05-31 63 views
0

我試圖使用node.js和express來綁定我的web應用程序中的c3圖表。但c3.js文件提供了以下錯誤消息:d3.scale未定義使用快遞

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 

回答

0

我解決了這個問題,對於那些誰有同樣的問題下面你可以找到合適的訂單和正確版本的libararys:

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