Jump to content
Changes to the Jaspersoft community edition download ×

Ploting Bar Charts In Jasper


nileshsuresh

Recommended Posts

I am working with charts jasper reports. I want to create a bar chart with x axis having age groups and y axis having age.

Below is the jrxml that i created for this. fieldA contains the age group (for eg: 0-9, 10-19) and fieldB contains age. But the tab <categoryExpression> only accepting date values. Is there any way to create a bar chart without date values in x axis using jasper?

 

<bar3DChart>

<chart evaluationTime="Report" customizerClass="">

<reportElement positionType="Float" x="325" y="50" width="275" height="150"/>

<chartTitle></chartTitle>

<chartSubtitle></chartSubtitle>

</chart>

<categoryDataset>

<dataset resetType="None"/>

<categorySeries>

<seriesExpression><![CDATA["Age"]]></seriesExpression>

<categoryExpression><![CDATA[$F{fieldA}]]></categoryExpression> <valueExpression><![CDATA[$F{fieldB}]]></valueExpression>

</categorySeries>

</categoryDataset>

<bar3DPlot>

<plot backcolor="#ffffff"/>

</bar3DPlot>

</bar3DChart>

 

Thanks in advance for your help.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...