如何使用 JAVAFX 图表在图表上绘制多个轴 [英] How to draw multiple axis on a chart using JAVAFX Charts

查看:28
本文介绍了如何使用 JAVAFX 图表在图表上绘制多个轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

愿你平安!

以下是大型软件中趋势的图像,其中绘制了一些实时数据和历史数据.有两支笔注册,每支笔的单独轴定义在同一趋势上.

Following is an image of a trend in a huge software where some real time as well as history data is being plotted. There are two pens registered and separate axis for each pen is defined on the same trend.

我一直试图在 JavaFX 2.0 图表中做到这一点.我已经能够绘制如下实时图表:

I have been trying to do exactly this in JavaFX 2.0 charts. I have been able to plot a real time chart which is as follows:

我一直在使用 JavaFX 研究多轴,并且可以找到 this 链接,但我认为这是使用 FXML 的旧版 JavaFX.但是,我使用 JavaFX 常规类来完成此操作.

I have been researching about multiple axis using JavaFX and could find the this link but I think this is an older version of JavaFX using FXML. However, I am using JavaFX regular classes to accomplish this.

帮助!!!

推荐答案

在这里你可以找到我的解决方案 - MultipleAxesLineChart.它不是通用的,只是满足我的需求,但我认为它可以很好地说明如何使用 StackPane 来完成它.

Here you can find my solution - MultipleAxesLineChart. It is not generic and just fits my needs, but I think it can give a good sight of how it can be done by using StackPane.

这篇关于如何使用 JAVAFX 图表在图表上绘制多个轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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