Hi Friends,
I'm facing this problem while using Charts of iReport2.0.0. After the usual reports I needed to make Charts and I chose the option of Bar 3-D charts and drew the chart in LastPageFooter.The chart gets its data from the query which fetches the desired fields.I am using MySql3.0 for the database.
The output was that the bars are very very thin and I need to increase the thickness of these Bars and increase or decrease the distance between two consecutive bars as per requirements. What do I do that changes the thickness of the bars and also the distance between the bars?
Following is the code in case you would need it.
------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
name="ActiveContact"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="520"
pageHeight="842"
columnWidth="460"
columnSpacing="0"
leftMargin="30"
rightMargin="30"
topMargin="20"
bottomMargin="20"
whenNoDataType="NoPages"
isTitleNewPage="false"
isSummaryNewPage="false">
<property name="ireport.scriptlethandling" value="0" />
<property name="ireport.encoding" value="UTF-8" />
<import value="java.util.*" />
<import value="net.sf.jasperreports.engine.*" />
<import value="net.sf.jasperreports.engine.data.*" />
<parameter name="companyid" isForPrompting="true" class="java.lang.Integer"/>
<queryString><![CDATA[SELECT account.AccountName,count(contact.Id)
FROM CONTACT contact
LEFT OUTER JOIN ACCOUNT account on contact.AccountId=account.id
WHERE
contact.active=1
AND contact.companyid=4
GROUP BY account.AccountName
ORDER BY account.AccountName]]></queryString>
<field name="AccountName" class="java.lang.String"/>
<field name="count(contact.Id)" class="java.lang.Long"/>
<variable name="AccName" class="java.lang.String" resetType="Report" calculation="Count">
<variableExpression><![CDATA[$F{AccountName}==null ? "blank":$F{AccountName}]]></variableExpression>
</variable>
<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="0" isSplitAllowed="true" >
</band>
</title>
<pageHeader>
<band height="0" isSplitAllowed="true" >
</band>
</pageHeader>
<columnHeader>
<band height="0" isSplitAllowed="true" >
</band>
</columnHeader>
<detail>
<band height="0" isSplitAllowed="true" >
</band>
</detail>
<columnFooter>
<band height="0" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="0" isSplitAllowed="true" >
</band>
</pageFooter>
<lastPageFooter>
<band height="171" isSplitAllowed="true" >
<bar3DChart>
<chart isShowLegend="false" hyperlinkTarget="Self" >
<reportElement
mode="Opaque"
x="69"
y="0"
width="308"
height="171"
key="element-1"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<chartTitle color="#000000" >
<titleExpression><![CDATA["Active Contact"]]></titleExpression>
</chartTitle>
</chart>
<categoryDataset>
<dataset >
</dataset>
<categorySeries>
<seriesExpression><![CDATA[$V{AccName}]]></seriesExpression>
<categoryExpression><![CDATA[$V{AccName}]]></categoryExpression>
<valueExpression><![CDATA[$F{count(contact.Id)}]]></valueExpression>
<itemHyperlink >
</itemHyperlink>
</categorySeries>
</categoryDataset>
<bar3DPlot xOffset="20.0" >
<plot backcolor="#FFFFFF" orientation="Horizontal" labelRotation="325.0" >
<seriesColor seriesOrder="0" color="#FF0000"/>
<seriesColor seriesOrder="1" color="#FF0000"/>
<seriesColor seriesOrder="2" color="#FF0000"/>
</plot>
<categoryAxisFormat>
<axisFormat tickLabelColor="#000000" axisLineColor="#FFFFFF" >
</axisFormat>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat axisLineColor="#000000" >
</axisFormat>
</valueAxisFormat>
</bar3DPlot>
</bar3DChart>
</band>
</lastPageFooter>
<summary>
<band height="0" isSplitAllowed="true" >
</band>
</summary>
</jasperReport>
---------------------------------------------------------------------------
Kindly Help.