trojnfn Report post Posted February 3, 2010 For my pie chart, I currently have two slices, one representing the total dollar amount of apples and the other slice representing the totla dollar amount of oranges. Is there a way to display a second (or even third) label/amount, for the same slice ? For example, the original pie slice displays $50.00 for apples and $50.00 for organges. Since the total amount is $100.00. I want to display a second label/amount for apples, displaying '50% of total', and also displaying '50% of total' for organes. So for each slice, I want to display the dollar amount and the percentage of that amount, compared to the total. Thanks Share this post Link to post Share on other sites
Guest Rajroop Report post Posted February 3, 2010 Hi, Since you would like to have another label/amount display for each slice of the pie, whether it be oranges or apples, you could consider using a new line break for this. Here's the idea. We require two labels for each slice. We introduce a new line break, in-between the labels, and add the second item to the initial label. The new-line break would be by using . For example: <chart caption='Company Revenue' showPercentageValues='1'> <set label='Services and Consultancy' value='26' /> <set label='Hardware and Software' value='32' /> </chart> I hope this helps. Share this post Link to post Share on other sites
trojnfn Report post Posted February 3, 2010 This is the code that I am using in coldfusion for my pie chart. It basically creates an xml string and uses the renderChart command to call variable strXMLPie to produce the pie chart. It works fine. The variable name 'fruit' is either apples or oranges and the variable totalCharges is the cost of each. I tried to use your method with the line break and but it does not like it. I think # is causing the problem, since that is a coldfusion sysmbol. Can you help me with my code below and see exactly where your commands fit ? <cfset strXMLPie = "<chart caption='Apple vs. Oranges' subCaption='January 2010' animation='1' pieSliceDepth='30' showborder='0' baseFontSize='15' formatNumber='1' formatNumberScale='0' numberPrefix='$'>"> <cfloop query="qry"> <cfset strXMLPie = strXMLPie & "<set label='#fruit#' value='#totalCharges#' link='" & '../reports/xxxReport' & "'/>"> </cfloop> <cfset strXMLPie = strXMLPie & "</chart>"> Share this post Link to post Share on other sites
Guest Madhumita Report post Posted February 4, 2010 Hello, You can try following the steps below and see if this helps: 1. Use the displayValue attribute in the <set> element to display your custom label. 2. Break down the custom display value in as many lines you wish using the line-break chracter. e.g. <set label="Apple" value="50" displayValue="Total Dollar Amount: $50.00 Percentage Value= 50% " /> I hope this helps you. Share this post Link to post Share on other sites