删除 JFreeChart 中的特定绘图键条目

发布于 2024-08-02 03:11:11 字数 187 浏览 1 评论 0原文

我在 JFreeChart 中有一个带有多个 XYDataset 的 XYPlot。 默认情况下,JFreeChart 在绘图底部创建一个键,其中包含每个系列的条目。 我想禁用一个数据集中所有系列条目的绘制。 我不想完全禁用条目的绘制。这是否可以在不修改渲染器的情况下实现? 谢谢!

I have an XYPlot in JFreeChart with multiple XYDatasets. JFreeChart creates a key at the bottom of the plot with an entry for each series by default. I would like to disable the drawing of entries for all of the series in one of my datasets. I do not want to disable the drawing of entries altogether. Is this possible without modifying the renderer? Thanks!

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

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

发布评论

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

评论(1

心欲静而疯不止 2024-08-09 03:11:11

您应该能够通过在渲染上调用 setSeriesVisible() 或 setBaseSeriesVisible() 直接执行此操作。

对于底部的图例,您可以使用 setSeriesVisibleInLegend() 或 setBaseSeriesVisibleInLegend()

You should be able to do this directly by calling setSeriesVisible() or setBaseSeriesVisible() on your render.

For the legend at the bottom you can use setSeriesVisibleInLegend() or setBaseSeriesVisibleInLegend()

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