D3.js 5.0.0 发布,可视化 JS 库

栏目: 软件资讯 · 发布时间: 7年前

内容简介:D3.js 5.0.0 发布。D3 5.0 仅引入了一些非向后兼容的更改。 D3现在使用 Promises 而不是异步回调来加载数据。承诺简化异步代码的结构,特别是在支持异步和等待的现代浏览器中。 例如加载V4 CSV文件: d3.csv("...

D3.js 5.0.0 发布。D3 5.0 仅引入了一些非向后兼容的更改。

D3现在使用 Promises 而不是异步回调来加载数据。承诺简化异步代码的结构,特别是在支持异步和等待的现代浏览器中。

例如加载V4 CSV文件:

d3.csv("file.csv", function(error, data) {
  if (error) throw error;
  console.log(data);
});

在 v5 版本中用 promises:

d3.csv("file.csv").then(function(data) {
  console.log(data);
});
  • D3现在使用Fetch API而不是XMLHttpRequest:d3-request模块已被d3-fetch取代。

  • D3不再提供d3.schemeCategory20 *分类颜色方案

  • D3现在提供通过d3等值线实现步进平方和密度估计

完整内容请查看发布主页


【声明】文章转载自:开源中国社区 [http://www.oschina.net]


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Computing Patterns in Strings

Computing Patterns in Strings

Bill Smyth / Addison Wesley / 2003 / $ 75.00

The computation of patterns in strings is a fundamental requirement in many areas of science and information processing. The operation of a text editor, the lexical analysis of a computer program, the......一起来看看 《Computing Patterns in Strings》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码