Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试创建一个散点图,其中 XAxes 和 YAxes 的比例和大小相同。该图将成为具有相同轴的正方形。因此,如果数据是 {x:0, y:0}, {x:100, y:100} 它会绘制一条对角线(45 度)。我正在绘制 A vs. B 并且绘图的矩形形状令人困惑。
最大值是提前知道的。
在数据集中,您可以设置 pointStyle。
datasets: [{pointStyle:'rect'}]
对于其他类型
刚刚找到它:只需将 aspectRatio: 1 添加到选项中