html D3byEX 5.8:范围频带(适应D3.js v4)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html D3byEX 5.8:范围频带(适应D3.js v4)相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html>
    <meta charset=utf-8>
<head>
    <meta name="description"
          content="D3.js v4, .scaleBand, .rangeRound,
                  ordinal scale with range bands" />
</head>
<body>
    <script src="http://d3js.org/d3.v4.js"></script>
    <script>
        var bands = d3.scaleBand()
                      .domain([0, 1, 2])
                      .rangeRound([0, 100]);
        console.log(bands.range());
        console.log(bands.bandwidth()); // 33
    </script>
</body>
</html>

以上是关于html D3byEX 5.8:范围频带(适应D3.js v4)的主要内容,如果未能解决你的问题,请参考以下文章

html D3byEX:4.7:右轴(适应D3.js v4)

html D3byEX 9.9:环形图(适应D3.js v4)

html D3byEX 7.3:延迟转换(适应D3.js v4)

html D3byEX 7.1:动画颜色(适应D3.js v4)

html D3byEX 6.4:气泡图(适应D3.js v4)

html D3byEX 6.3:网格线(适应D3.js v4)