dheeraj.madhu Posted April 29, 2014 Share Posted April 29, 2014 Hi. I am trying to generate the time series graph using List data source.My JRXML for graph is <group name="timeSeries"> <groupExpression><![CDATA[null]]></groupExpression> <groupHeader> <band height="250"> <!-- Time series chart --> <timeSeriesChart> <chart evaluationTime="Report"> <reportElement positionType="Float" x="0" y="25" width="550" height="175"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <timeSeriesDataset timePeriod="Minute"> <dataset incrementType="None"/> <timeSeries> <seriesExpression><![CDATA["Count"]]></seriesExpression> <timePeriodExpression><![CDATA[new Date(Long.valueOf($F{timeStamp})*1000)]]></timePeriodExpression> <valueExpression><![CDATA[integer.valueOf($F{count})]]></valueExpression> </timeSeries> </timeSeriesDataset> <timeSeriesPlot isShowLines="true" isShowShapes="false"> <plot/> <timeAxisFormat> <axisFormat> <labelFont/> <tickLabelFont/> </axisFormat> </timeAxisFormat> <valueAxisFormat> <axisFormat> <labelFont/> <tickLabelFont/> </axisFormat> </valueAxisFormat> </timeSeriesPlot> </timeSeriesChart> <!-- Time series chart --> </band> <!-- <band/> --> </groupHeader> </group>[/code] And My List is public class EventBean { private String name; private List<TimeSeriesBean> timeStamps;}public class TimeSeriesBean { private String count; private String timeStamp;}[/code]Data passes to Jasper is List<EventBean>. Each EventBean is having time stamp and count at that time stamp.If i have only one Element in List<EventBean> I get one time line graph. If 2 or more elements it then i can't print the graph.I want to append all data to same tiem series chart. How to achieve this?PS:Sorry Can't format this XML. While editing the post it shows it is already formated. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now