I created a stacked bar chart in iReport. Some of the labels under each bar are truncated after an random number of characters are displayed. Some labels Have one letter "O..." others have 6 "Safet...". others have all characters "Finance".
Is there a property in iReport I can set to display the whole label under each bar? Similar to the "Stretch With Overflow" that other text elements have?
I get the same behavior in iReport 4.5.1 and 4.7.
Here is the XML for that particular chart.
<stackedBarChart>
<chart>
<reportElement x="0" y="26" width="555" height="257"/>
<chartTitle/>
<chartSubtitle/>
<chartLegend position="Bottom"/>
</chart>
<categoryDataset>
<dataset>
<incrementWhenExpression><![CDATA[$F{Percentage}<100]]></incrementWhenExpression>
<datasetRun subDataset="dsSectionChart">
<datasetParameter name="C_ID">
<datasetParameterExpression><![CDATA[$P{C_ID}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="L_STR">
<datasetParameterExpression><![CDATA[$P{L_STR}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="START_DATE">
<datasetParameterExpression><![CDATA[$P{START_DATE}]]></datasetParameterExpression>
</datasetParameter>
<datasetParameter name="END_DATE">
<datasetParameterExpression><![CDATA[$P{END_DATE}]]></datasetParameterExpression>
</datasetParameter>
</datasetRun>
</dataset>
<categorySeries>
<seriesExpression><![CDATA[$V{PRIORITY_STR}]]></seriesExpression>
<categoryExpression><![CDATA[$F{sectionName}]]></categoryExpression>
<valueExpression><![CDATA[$V{R_COUNT}]]></valueExpression>
<labelExpression><![CDATA[$F{sectionName}]]></labelExpression>
</categorySeries>
</categoryDataset>
<barPlot isShowLabels="false" isShowTickMarks="true">
<plot labelRotation="0.0">
<seriesColor seriesOrder="0" color="#10253F"/>
<seriesColor seriesOrder="1" color="#558ED5"/>
<seriesColor seriesOrder="2" color="#C6D9F1"/>
</plot>
<itemLabel/>
</barPlot>
</stackedBarChart>
In short, no: there's no simple property you can set to ensure that the entire label gets shown. For the most part this is really a JFreeChart question rather than a JasperReports question, since it's JFreeChart which renders the chart image.
Often the simplest solution is to rotate the labels. This gives them more room. Try them at 45 or 90 degrees to see if that's an acceptable solution.
It's also possible to write a chart customizer to control the behavior more precisely. I wrote an article a while back about chart customizers where I cover exactly the example of handling longer labels in bar charts. It might be useful for you.