小编R.M*_*itt的帖子

D3 我如何从 0 以外的地方开始我的 y 轴

我有一个像这样的双轴图

在此处输入图片说明

2 Y 轴未按最佳比例缩放 理想情况下 - 右手 YI 希望从 1.5 开始并在 0.1 处的 4 个刻度处结束 -左手 YI 想从 50 处开始并在 1 处结束 60 个刻度

如何做到这一点,这是我的代码和数据:

<!DOCTYPE html>
<meta charset="utf-8">

<head>
<title>Self Identification Percentages</title>
<style>
.dataDisplay {
  font-size:1em;
}


body { font: 12px Arial;}

path { 
    stroke-width: 2;
    fill: none;
}

.axis path,
.axis line {
    fill: none;
    stroke: grey;
    stroke-width: 1;
    shape-rendering: crispEdges;
}



</style>

 <script src="./jquery.min.js" type="text/javascript"></script>
 <script src="./jquery-ui.min.js" type="text/javascript"></script>
 <script src="./jquery.corner.js"></script>
</head>

<body>

<script src="./d3/d3.v3.min.js"></script>








<div id="graph"></div>

<script> …
Run Code Online (Sandbox Code Playgroud)

javascript css axis-labels d3.js

5
推荐指数
2
解决办法
5045
查看次数

标签 统计

axis-labels ×1

css ×1

d3.js ×1

javascript ×1