mcstoufer Posted January 23, 2008 Report Share Posted January 23, 2008 I couldn't find any examples showing how to add additional text as a label to each point in a chart. I thought the use of Series and SeriesAttribute would help, but no go. The use of a legend is a final option for me. BTW, as the title shows, I'm trying to get this done with the cfxjava TagLib. Quote Link to comment Share on other sites More sharing options...
GabrielA Posted January 24, 2008 Report Share Posted January 24, 2008 You can set that up with the PointLabelMask, here is a example: <chartfx:chart height="400" width="600" gallery="pie" NSeries="1" NValues="3" pointLabels="true" pointLabelMask="Value %v: Represents %p%%"> <chartfx:pie shadows="true" labelsInside="false"/> </chartfx:chart> Look at the Chart.setPointLabelsMask api doc for the list od availabe % "wilcards" Quote Link to comment Share on other sites More sharing options...
mcstoufer Posted January 24, 2008 Author Report Share Posted January 24, 2008 That's why I couldn't find that parameter, it was up in the chart element. My current working solution is to modify the label elements inside the legend. This works in a static manner, but fails to compile when I encapsulate them with a c:forEach tag. I submitted a bug report for this (120875) Snippet: <chartfx:legend> <c:forEach items="${pieChartBean.headerSet}" var="header" varStatus="headerStatus"> <chartfx:label index="${headerStatus.index}" label="${header}"/> </c:forEach></chartfx:legend> Is there an 'unsafe' fix I can make to the taglib jar on my side to inhibit this checking? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.