Jump to content

Pie chart label not showing in iReport 3.7.6 on Mac OSX 10.6


newwebid

Recommended Posts

Hello -

I am using iReport 3.7.6 on Mac OSX 10.6 and I am having trouble with a simple 2D pie chart.

I did everything by the book ("The Ultimate Guide for iReport" from Jaspersoft), still the labels on the chart just won't show when I preview the report.

Can someone take a look at my report (see the XML below) and tell me what I am missing?

 

Thanks,

 

Bing

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="chart_test2" language="groovy" pageWidth="595" pageHeight="842" 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="212"/>	<queryString>		<![CDATA[select name, cnt from(select count(u.id) cnt, c.name from user u join user_profile p on u.id=p.uid join country c on (p.country_code=c.code) group by c.name) twhere cnt>20000]]>	</queryString>	<field name="name" class="java.lang.String"/>	<field name="cnt" class="java.lang.Long"/>	<background>		<band splitType="Stretch"/>	</background>	<title>		<band height="79" splitType="Stretch"/>	</title>	<pageHeader>		<band height="35" splitType="Stretch"/>	</pageHeader>	<columnHeader>		<band height="61" splitType="Stretch">			<staticText>				<reportElement x="0" y="0" width="168" height="20"/>				<textElement/>				<text><![CDATA[Country Name]]></text>			</staticText>			<staticText>				<reportElement x="178" y="0" width="100" height="20"/>				<textElement/>				<text><![CDATA[Number of Users]]></text>			</staticText>		</band>	</columnHeader>	<detail>		<band height="33" splitType="Stretch">			<textField>				<reportElement x="0" y="0" width="178" height="20"/>				<textElement/>				<textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression>			</textField>			<textField>				<reportElement x="178" y="0" width="100" height="20"/>				<textElement/>				<textFieldExpression class="java.lang.Long"><![CDATA[$F{cnt}]]></textFieldExpression>			</textField>		</band>	</detail>	<columnFooter>		<band height="45" splitType="Stretch"/>	</columnFooter>	<pageFooter>		<band height="54" splitType="Stretch"/>	</pageFooter>	<summary>		<band height="449" splitType="Stretch">			<pieChart>				<chart isShowLegend="true">					<reportElement x="15" y="0" width="523" height="411" isRemoveLineWhenBlank="true"/>					<chartTitle/>					<chartSubtitle/>					<chartLegend position="Right"/>				</chart>				<pieDataset maxCount="20">					<keyExpression><![CDATA[$F{name}]]></keyExpression>					<valueExpression><![CDATA[$F{cnt}]]></valueExpression>					<labelExpression><![CDATA[$F{name}]]></labelExpression>				</pieDataset>				<piePlot labelFormat="{0}">					<plot/>					<itemLabel color="#000000" backgroundColor="#FFFFFF">						<font isBold="false"/>					</itemLabel>				</piePlot>			</pieChart>		</band>	</summary></jasperReport>
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...