报告趋势线
除了显示数据点之外,如何在 JasperReports 中创建一条遵循数据趋势的线?以下是之前和之后的照片:
之前
之后
时间序列报告似乎没有任何此类选项来绘制橙色线。 (橙色线应该是平滑且细的,但这是总体思路。)
有什么想法如何使用 iReport 3.7.1 制作这样的报告吗?
How would you create a line in JasperReports that follows the trend for the data, in addition to showing the data points? Here are before and after shots:
Before
After
The Time Series report does not appear to have any such option to draw the orange line. (The orange line should be smooth, and thinner, but that's the general idea.)
Any ideas how to craft such a report with iReport 3.7.1?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种解决方案需要以下项目:
BezierLineCustomizer
使线条弯曲。RunningAverageIncrementer
用于计算基于变量的运行平均值。RunningAverageIncremeter
的 iReport 变量。BezierLineCustomizer 类
RunningAverageIncrementer 类
iReport 变量
创建一个使用
RunningAverageIncrementerFactory
类的变量(留给读者练习)。将其变量表达式设置为绘制的值。将其初始值表达式设置为零。Spline
设置 TimeSeries 图表的 Customizer Class 属性以使用
BezierLineCustomizer
类。结果
经过这些修改,运行平均值清晰可见:
One solution requires the following items:
BezierLineCustomizer
to make the lines curved.RunningAverageIncrementer
to calculate a running average based on a variable.RunningAverageIncremeter
.BezierLineCustomizer Class
RunningAverageIncrementer Class
iReport Variable
Create a variable that uses the
RunningAverageIncrementerFactory
class (exercise left to the reader). Set its variable expression to the plotted value. Set its initial value expression to zero.Spline
Set the Customizer Class property of the TimeSeries chart to use the
BezierLineCustomizer
class.Result
After these modifications, the running average is clearly visible: