JavaFX-带有隐藏轴的XYChart [英] JavaFX - XYChart with Axis Hidden

查看:91
本文介绍了JavaFX-带有隐藏轴的XYChart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使轴隐藏的XYChart?理想情况下删除.

Is it possible to make an XYChart that has its axis hidden? Ideally removed.

从源头上看,似乎它必须有一个,这是由于在调用layoutChartChildren()时XYChart不会检查空Axis的限制,这很可惜,因为XYChart提供了多个数据序列,并且在其中添加了数据.一系列.

From looking at source it seems that it must have one due to the limitation that XYChart does not check for null Axis when layoutChartChildren() is called, which is a shame since XYChart provides for multiple data series and the addition of data in a series.

IMO与轴心国分离.

IMO a separation of concern from the Axis.

对解决方案有何想法?

推荐答案

之后,您已经显示了显示图表的阶段,请调用:

After you have shown a stage displaying the chart, call:

for (Node n: chart.lookupAll(".axis")) {
  n.setVisible(false);
}

这篇关于JavaFX-带有隐藏轴的XYChart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆