JFreeChart:我想显示一些类别值..不是全部

发布于 2024-12-26 00:40:13 字数 286 浏览 2 评论 0原文

我英语写得不好,因为我不是母语人士。

我的问题是这样的:我正在努力将时间序列显示为条形图。我想要一个像 XYBarChartDemo1.java 这样的图表,它结合了 BarChartXYPlot 的各个方面。特别是,我希望图表的_x_轴使用小时而不是显示时间。例如,图表的类别必须显示该值,例如 13:00、14:00、15:00(以 1 小时为间隔)。我怎样才能做到这一点?

I cannot write English very well, because I'm not a native.

My problem is this: I'm working to display a time series as a bar chart. I want a chart like the XYBarChartDemo1.java that combines aspects of BarChart and XYPlot. Especially, I want that the charts _x_-axis shows time usingHour, notYear. For example, the charts category has to show that value like 13:00, 14:00, 15:00 (at 1 hour intervals). How can I make that work?

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

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

发布评论

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

评论(1

没︽人懂的悲伤 2025-01-02 00:40:13

听起来你想要ChartFactory.createXYBarChart()。对于每小时数据,请使用 Hour 作为 RegularTimePeriod,如此处 使用Day

It sounds like you want ChartFactory.createXYBarChart(). For hourly data, use Hour for your RegularTimePeriod, as shown here using Day.

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