当年龄范围差异很大时,如何缩放图表上的数据以便更好地查看?

发布于 2024-12-25 02:09:41 字数 251 浏览 4 评论 0原文

我正在尝试使用 Java Swing 和 JFreeChart 可视化计算机性能数据。 在一张图表上,我想显示某个进程的 CPU 负载 (%) 和用户内存。因此,CPU 的可能值为 0..100,但对于内存:从 10KB (10*1024b) 到 500MB (500*1024*1024b),差异很大。

呈现这些数据的最佳方式是什么? 谢谢你!

I'm trying to visualize computer performance data using Java Swing and JFreeChart.
On one chart I want to show CPU load (%) and user memory by some process. So, the possible values for CPU are 0..100, but for memory: from 10KB (10*1024b) to 500MB (500*1024*1024b), the difference is big.

What is the best way to present that data?
Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

驱逐舰岛风号 2025-01-01 02:09:41

我假设这将是一个图表,X 轴上有时间,Y 轴上有性能指标。

在这种情况下,我会将内存显示为已用内存的百分比,而不是使用中的(千|兆|千兆)字节数。这样,它就可以叠加在 CPU(和其他性能指标)上,而不会扭曲整体规模。

我不再有开发人员指南的副本(必须从 JFree.org 购买),但我记得,JFreeChart 提供了一种向折线图上的点添加工具提示的方法。如果用户不仅仅对所用内存的百分比感兴趣,您可以使用它为用户提供一种查看正在使用的(千|兆|千兆)字节的方法。

I'm assuming this will be a graph which is has time on the X axis and performance metric on the Y axis.

This being the case, I would display the memory as % of memory used instead of the number of (kilo|mega|giga)bytes in use. This way it could be overlaid on the CPU (and other performance metrics) without distorting the overall scale.

I no longer have a copy of the developer guide (this must be purchased from JFree.org) but as I recall, JFreeChart offers a way to add a tool-tip to points on a line graph. You could use this to provide the user a way to see the (kilo|mega|giga)bytes in use if they were interested in more than just the % of memory used.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文