我使用 d3 js 和 padding 制作了一个圆圈。现在,我希望这张图表从 -90 角度开始
我也附上了我的代码和输出。我还附上了我的预期输出。您可以在这里查看。
<style type="text/css">
body {
font-family: sans-serif;
margin-top: 25px;
font-size: 18px;
}
.monthArc {
fill: #cc3333;
}
.monthText {
fill: #FFF;
font-size: 34px;
font-weight: 500;
}
</style>
<div id="chart"></div>
<script type="text/javascript">
var screenWidth = window.innerWidth;
// var color = d3.scale.category20c();
var margin = {
left: 25,
top: 25,
right: 25,
bottom: 25
},
width = Math.min(screenWidth, 600) - margin.left - margin.right,
height = Math.min(screenWidth, 600) - margin.top - margin.bottom;
//The start date …Run Code Online (Sandbox Code Playgroud)