Created
January 29, 2019 02:45
-
-
Save lirongfei123/2cbd373df5df9074bf114ba5b79eddfb to your computer and use it in GitHub Desktop.
d3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
const path = d3.path() | |
path.rect(0, 10, 30, 40); | |
console.log(path); | |
svg.append('g').append("path").attr('d', path.toString()) | |
.style("stroke", 'red'); | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
var svg = d3.select('#c1').append('svg') | |
.attr('width', '800') | |
.attr('height', '800') | |
.append('g'); | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = d3.scaleLinear() | |
.domain([10, 130]) | |
.range([0, 960]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3.randomUniform(1, 5)() 返回一个大于等于 1 且小于 5 的随机数. | |
分布方式: | |
一般分布 | |
高斯分布 | |
对数分布 | |
贝次分布 | |
指数分布 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment