我正在尝试使用 d3 创建销售管道图。下面是一个例子。有谁知道我可以开始使用的示例代码吗?
感谢任何帮助。
最佳答案
对于不同的方法,这里是一个完全使用 CSS 的示例:
<div id='chart'>
<div id='plotA'> </div>
<div id='plotB'> </div>
<div id='plotC'> </div>
<div id='plotD'> </div>
<div id='plotE'> </div>
</div>
#chart {
text-align: center;
}
#chart div {
margin-top: 2px;
}
#plotA {
border-top: 5px solid #3B5592;
border-left: 2px solid transparent;
border-right: 2px solid transparent;
height: 0; width: 200px;
}
#plotB {
border-top: 100px solid #BF2E2B;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
height: 0; width: 100px;
}
#plotC {
margin-left: 50px;
border-top: 50px solid #8CB638;
border-left: 25px solid transparent;
border-right: 25px solid transparent;
height: 0; width: 50px;
}
#plotD {
margin-left: 74px;
border-top: 23px solid #684A94;
border-left: 16px solid transparent;
border-right: 16px solid transparent;
height: 0; width: 18px;
}
#plotE {
margin-left: 90px;
border-top: 15px solid #24A4C7;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
height: 0; width: 4px;
}
关于jquery - 销售管道图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12643824/