1

我正在使用http://bl.ocks.org/jasondavies/1341281平行坐标可视化来可视化我的数据。但是,我希望将轴重新定向为水平布局,而不是针对某些特定任务的轴的传统垂直布局。我尝试使用代码,但没有到达任何地方。

我附上了一张图片,描述了我真正想要实现的目标。我有足够的信心,如果我能让轴正确布局,我可以修复轴和刻度上的标签。有人可以帮忙吗?先感谢您。预期的轴布局

4

1 回答 1

1

You can rotate the graph like this by rotating the group which contains the chart:

.attr("transform", "translate(" + margin.left + "," + margin.top + ")"
+ "rotate(270, "+width/2 + "," + height/2 + ")");

This means to rotate the chart by 270 degrees about the center of the chart which is given by width/2 and height/2.

Working code here

Hope this helps!

于 2016-01-02T05:28:39.030 回答