【问题标题】:D3 module on Drupal doesn't show examplesDrupal 上的 D3 模块不显示示例
【发布时间】:2018-03-30 20:23:18
【问题描述】:

我已经在 Drupal 7.x 上安装了 D3.js 模块,启用了 D3 视图和 D3 示例模块,将 d3.js 上传到了 sites/all/libraries/d3 但是当我尝试访问示例时,例如 /d3 /examples/bar,我得到错误:

Uncaught TypeError: Cannot read property 'linear' of undefined

看起来 D3 库没有加载...我搜索了很多但没有找到任何提示。我在这里错过了什么?

【问题讨论】:

    标签: d3.js drupal-7 drupal-modules


    【解决方案1】:

    如果您使用的是7.x-1.0-alpha3D3 module 的版本,则需要下载https://d3js.org/d3.v3.js 并替换为sites/all/libraries/d3/d3.js。它对我有用,如屏幕截图所示。

    确保文件名必须与d3.js 保持一致。

    更多详情:click here

    希望对你有所帮助。

    【讨论】:

    • 所以这意味着我们不能使用高于 3 的 D3 版本,尽管 D3 模块中说要下载最新版本?
    • 模块文档中可能没有提到它。
    猜你喜欢
    • 2023-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多