如何在 jsp 上显示呈现为图像的 jfreecharts 的工具提示
我正在使用 JFreeChart,并且通过 JSP 使用 servlet 将图表呈现为图像。我在使用图表框架时看到了工具提示。如何在 JFreeChart 图像上显示工具提示。请帮我;这很重要。
I am using JFreeChart, and I am rendering the chart as an image using a servlet via JSP. I saw the tooltips while using a chart frame. How can I display tooltips on the JFreeChart image. Please help me; it's important.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在servlet/JSP环境中,图表的动态功能不可用。对于工具提示,您可以使用标签生成器实现类似的效果,如此处所示。当然,您可以向 servlet 提供任何所需的请求参数,但代价是每个新请求都需要重新生成图表。
为了改善用户体验,除了提供静态图像之外,还可以考虑使用 Java Web Start 部署图表通过 JSP。此相关示例可能会提示基本的可能性。
In a servlet/JSP environment, the dynamic features of a chart are unavailable. For tooltips, you can achieve a similar effect using a label generator, shown here. Of course you can supply any desired request parameters to the servlet, at the expense of re-generating the chart with each new request.
For an improved user experience, consider deploying your chart using Java Web Start, in addition to offering the static image via JSP. This related example may suggest the basic possibilities.