dc.js 与 d3.js v4 的兼容性 [英] dc.js compatibility with v4 of d3.js

查看:26
本文介绍了dc.js 与 d3.js v4 的兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不向后兼容的 d3.js 4.x 版本于 6 月底发布.

dc.js 的 bower.json 包括:

依赖项":{"d3": "3.x",crossfilter2":~1.3"}

明确要求 d3.js 的 v3(不更高).

dc.js 当前是否与 d3.js 的 4.x 版兼容?如果没有,这是计划中的吗?

解决方案

它绝对兼容.d3 v4 有破坏性的 api 更改.

就计划而言,dc.js 的 github 帐户上对此进行了热烈的讨论:

<块引用>

那么计划是什么?使用@jfsiii 完成 dc v2 的建议使用 d3 v3,然后使用 d3 v4 创建 dc v3?会升级到 d3v4 保证几乎完全重写?

<小时><块引用>

gordonwoodhull:类似的东西....我怀疑这是重写,因为现在的代码方式有很多微妙的细节.当然,如果你想从头开始编写 dc.js,没有人会阻止你,但我更愿意看到这个 repo 的发展......许多图表库都因为试图一次改变一切而死了.

Version 4.x of d3.js, which is not backward compatible, came out end of June16.

The bower.json for dc.js includes:

"dependencies": {
  "d3": "3.x",
  "crossfilter2": "~1.3"
}

which explicitly requires v3 (not higher) of d3.js.

Is dc.js currently compatibility with version 4.x of d3.js? If not, is this planned?

解决方案

It's definitely not compatible. d3 v4 has breaking api changes.

As far as plans go, there's a lively discussion about this on dc.js' github acount:

So what is the plan then? Use @jfsiii suggetion of finishing off dc v2 using d3 v3 and then create dc v3 using d3 v4? Would upgrading to d3 v4 warrant an almost complete re-write?


gordonwoodhull: Something like that. ... I doubt it's a rewrite as there are a lot of subtle details to the way the code is now. Of course if you want to write dc.js from scratch, no one's stopping you, but I'd rather see this repo evolve... Many chart libraries have died from trying to change everything at once.

这篇关于dc.js 与 d3.js v4 的兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆