在 JasperReports 条形图中处理大数据
我正在使用JasperReports 4.0.1
我有大量的数据集要在分组条形图中表示,
条形图挤满了并且渲染得彼此非常接近。
有什么方法可以正确缩放它吗?
或者给出记录数量限制,之后 JasperReports 可以将其拆分为多个图表?
I'm using JasperReports 4.0.1
I am having large data set to be represented in Grouped Bar Graph
The bar are crammed and rendered very close to each other.
Is there any way to scale it properly?
Or to give record number limit , after which JasperReports
can split it in multiple graphs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
图表定制器当然可以让您完全控制做任何您喜欢的事情。但在这种情况下,您也许仍然可以在没有图表定制器的情况下做一些有趣的事情。
我不确定你所说的“适当缩放”是什么意思,所以我无法对此部分发表评论。
您可以向报告添加一个组,以防止图表包含太多值。例如,您可以对这样的表达式进行分组:
这样,每组中将仅获得 10 个项目。将图表放入组页脚中。如果行数少于 10 行,您将得到一个图表。如果您有更多行,那么您将获得多个图表。
您的分组可能比仅仅计算行数更复杂,但应该应用相同的想法。
Chart customizers certainly give you full control to do whatever you like. But you could perhaps still do some interesting things without a chart customizer in this case.
I'm not sure what you mean by "scale it properly", so I can't comment on that part.
You could add a group to the report to prevent the chart from having too many values. For example you could group on an expression like this:
That way you would get only 10 items in each group. Put the chart into the group footer. In the case where you have fewer than 10 rows you'll get a single chart. If you have more rows, then you'll get multiple charts.
Your grouping would probably be more complex than just counting the rows, but the same idea should apply.
像 jasper-reports 中那样自定义图表的唯一方法是实现您自己的图表自定义程序类。这是我找到的一篇文章链接
The only way to do customize charts like that in jasper-reports is to implement your own chart customizer class. Here is an article I found link