Skip to main content
June 15, 2010
Question

piechart problem

  • June 15, 2010
  • 1 reply
  • 438 views

I am using webcharts to create a piechart.

My query to the piechart gives name and total. The interesting thing is that it works on certain days and it does not work on other days.

I have verified with cfdump that the query is correct. It returns unique names and total. Some of the name are longer, but it still works.

The piechart does not seem to like the result of the query on certain days.

Any help will be greatly appreciated.

    This topic has been closed for replies.

    1 reply

    Inspiring
    June 15, 2010

    You could help us by providing some code that demonstrates what you're talking about.

    It's a bit hard to guess what you mean by "does not work on other days".

    --

    Adam

    June 15, 2010

    Adam,

    Sorry for not being very clear. Here is my code

    <cfquery name="latencyTD" datasource="BIDW1">

    select STHLD_USR_ID,STHLD_NM,COUNT(*) as total

    FROM qdmapp.V_OPN_INCDT_TCKT

    where

    (CASE

    WHEN INCDT_OPN_DT_TM >= SYSDATE - 30 THEN '0 to 30 Days'

    WHEN INCDT_OPN_DT_TM < SYSDATE - 30 AND INCDT_OPN_DT_TM >= SYSDATE - 60 THEN '30 to 60 Days'

    WHEN INCDT_OPN_DT_TM < SYSDATE - 60 AND INCDT_OPN_DT_TM >= SYSDATE - 90 THEN '60 to 90 Days'

    WHEN INCDT_OPN_DT_TM < SYSDATE - 90 AND INCDT_OPN_DT_TM >= SYSDATE - 180 THEN '90 to 180 Days'

    WHEN INCDT_OPN_DT_TM < SYSDATE - 180  THEN '>180 Days'

    END

    )='#url.Age#'

    group by sthld_usr_id,sthld_nm

    </cfquery>

    <p><center class="contentTitle">Open Tickets for <cfoutput> #url.Age# </cfoutput></center></p>

    <!--- Output artists query as a pie chart --->

    <cfchart style="/etc/pieChart1.xml"  format="flash"

         chartheight="250" chartwidth="900" labelformat="number" show3d="true"   >

        <cfchartseries type="pie" query="latencyTD" valuecolumn="total" itemcolumn="STHLD_NM" />

    </cfchart>

    My style for the chart looks like this

    <?xml version="1.0" encoding="UTF-8"?>

    <pieChart depth="Thick" style="Solid" angle="-20">

              <axis>

                   <labelFormat pattern="#,##0.###"/>

                   <parseFormat pattern="#,##0.###"/>

                   <groupStyle>

                        <format pattern="#,##0.###"/>

                   </groupStyle>

              </axis>

              <dataLabels style="Pattern" autoControl="true" background="#FDFEF6" font="Arial-10">

              <![CDATA[

    $(colLabel) $(value) ($(colPercent))

              ]]>

              </dataLabels>

              <legend spacing="0" placement="Right">

                   <decoration style="None"/>

              <![CDATA[

    $(colLabel) Tickets $(value)

              ]]>

              </legend>

              <elements drawOutline="false">

                   <morph stage="Cols"/>

              </elements>

              <decoration />

              <paint palette="Modern" paint="Plain" max="100"/>

    </pieChart>

    The query returns names and total tickets. Depending on the data returned, piechart is behaving differently.

    On some days it loads properly. On other days, it does not load at all. I have verified the query and it is returning valid data.

    Thanks in advance.

    Inspiring
    June 17, 2010

    Depending on the data returned, piechart is behaving differently.

    On some days it loads properly. On other days, it does not load at all. I have verified the query and it is returning valid data.

    Right.  So what you need to do is to create a reproduction case which has hard-coded data (based on what comes back from the DB) that replicates the issue.

    Then look @ the data and check what it is that could be causing grief.

    --

    Adam