sandeeppant Posted August 24, 2012 Share Posted August 24, 2012 Hi, We have a requirement where in TimeSeries graph we need to show Time Series (X -Axis) in AM/PM format. By default it shows time in 24 hour format.Is there a way we can customize the X-axis to AM/PM?Code:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report2" pageWidth="800" pageHeight="400" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString> <![CDATA[select * from salestimeseries]]> </queryString> <field name="the_month" class="java.sql.Timestamp"/> <field name="units_sold" class="java.lang.Long"/> <field name="the_month1" class="java.sql.Timestamp"/> <field name="units_sold1" class="java.lang.Long"/> <background> <band splitType="Stretch"/> </background> <title> <band height="200" splitType="Stretch"> <timeSeriesChart> <chart isShowLegend="false" evaluationTime="Report"> <reportElement isPrintRepeatedValues="false" x="81" y="38" width="659" height="100"> <property name="net.sf.jasperreports.chart.domain.axis.tick.count" value="24"/> </reportElement> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <timeSeriesDataset timePeriod="Hour"> <timeSeries> <seriesExpression><![CDATA["InterConnect"]]></seriesExpression> <timePeriodExpression><![CDATA[$F{the_month}]]></timePeriodExpression> <valueExpression><![CDATA[$F{units_sold}]]></valueExpression> </timeSeries> <timeSeries> <seriesExpression><![CDATA["Local"]]></seriesExpression> <timePeriodExpression><![CDATA[$F{the_month1}]]></timePeriodExpression> <valueExpression><![CDATA[$F{units_sold1}]]></valueExpression> </timeSeries> </timeSeriesDataset> <timeSeriesPlot isShowLines="true" isShowShapes="false"> <plot/> </timeSeriesPlot> </timeSeriesChart> </band> </title></jasperReport> Link to comment Share on other sites More sharing options...
lakki911 Posted September 10, 2013 Share Posted September 10, 2013 <timeAxisFormat><axisFormat tickLabelMask="dd-MM-yyyy hh:mm:ss aa"/></timeAxisFormat>try this,hope this will help u... Link to comment Share on other sites More sharing options...
rohan.kumbhar1 Posted August 6, 2015 Share Posted August 6, 2015 No this is not working :( 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