CFChart Issue - Pie Chart

I have a customer who wants some charts in a PDF report they already get from an application. One of the charts is a Pie Chart and displays the dollar breakdown.  I ran into an issue with the value labels overlapping each other so I did some research and found this in the update docs

I made the changes to the default_pie.xml file and the other standard pie styles as indicated in the update documentation.  However I am still running into this problem with the label overlap.  I have also tried sorting these values in different ways to try and make the overlap disappear, but I have been unsuccessful. 

I have attached a sample pie chart, if anyone has a solution or an idea how to fix this let me know please (note the data overlays).



<cfquery dbtype="query" name="divChartQuery">
   select providerInvestTotalByDiv, div_name, div_shortname
   from qNeeds
   where provider_name = '#qNeeds.provider_name#'
   order by providerInvestTotalByDiv, div_shortname
</cfquery>

<cfchart format="png" xAxisTitle="Divisions"
      yAxisTitle="Total Allocation" show3d="false"
      chartheight="375" chartwidth="425" style="yellow"
      labelformat="currency">

   <cfchartseries type="pie"                   
      query="divChartQuery"         
      valueColumn="providerInvestTotalByDiv"
      itemColumn="div_shortname"/>

</cfchart>


6 responses to “CFChart Issue - Pie Chart”


  1. Terrence Ryan I'm having this same problem. I'm subscribing to find out if anyone else has this issue

  2. Dan G. Switzer, II @Joshua:

    Since the main problem is with large numeric values, can you just display the value in millions? Use 1.98m instead of 1,975,000.00.

  3. Joshua Dan - I might try that for the time being. Do you have a code sample on how to achieve this? I was using the labelformat=currency to get the dollars.

    All,
    I am sending some sample data to Adobe to see if they can replicate the issue.

  4. Josh Dan, I tried the reformat to 1.98M, it still over laps :( I looked into seeing if the lines could be made longer via the xml style and it doesnt look like that is possible.

  5. Ahamad Hi,
    I have been able to reproduce this issue. Thanks for bringing up this. We are working on this and will let you know once the issue is resolved.

    Thanks,
    ahamad
    Adobe CF Team

  6. Laurie Josh,

    I had the same issue. I didn't find a fix, but I found a workaround. First, instead of changing the default_pie.xml file, I made a copy of the file and placed it in the root of the directory my chart webpages are in on my website. I renamed the file and then refered to it in the <cfchart> tag on the individual webpages I want to use it with using style="mystyle.xml".

    <<cfchart chartwidth="550" chartheight="250" pieslicestyle="sliced" labelformat="number" tipstyle="mousedown" font="Times" fontsize="12" show3d="yes" yoffset="-1" backgroundcolor="##FFFFFF" style="mystyle.xml">
    <cfchartseries query="pq1" itemcolumn="sdesc" valuecolumn="Q1total" type="pie" datalabelstyle="pattern" colorlist="#valuelist(pq1.scolor)#"/>
    </cfchart>

    In the mystyle.xml document I added a new attribute "angle". Playing with the angle allowed me to rotate my 3d pie charts to a position in which the labels no longer overlap. It's not perfect, but it works.

    <<pieChart depth="Double" style="Solid" angle="150" is3D="false">>

Leave a Reply