Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfchart label disappears after sometime on x-axis

New Here ,
Jul 21, 2013 Jul 21, 2013

I'm running the following query and after running the QoQ for SECONDCONN , I am not getting the desired output in my cfchart.

    <!--- QoQ for FIRSTCONN --->

    <!--- Master Query --->

    <cfquery datasource = "XX.XX.X.XX" name="master1">

         SELECT STR_TO_DATE(date_format(Timedetail,'%m-%d-%Y'),'%m-%d-%Y') as FIRSTCONN

                , COUNT(Timedetail) as FIRSTOccurances

                , EVENTS

         FROM  MyDatabase

         WHERE EVENTS = "FIRST"

         GROUP BY FIRSTCONN ;

    </cfquery>

    <!--- Detail Query --->

    <!--- <cfdump var = "#master#"> --->

    <cfquery dbtype="query" name="detail1">

        SELECT  *

        FROM master1

        WHERE FIRSTCONN  >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar">

        AND   FIRSTCONN  <  <cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">;

    </cfquery> 

   

   

    <!--- QoQ for SECONDCONN --->

    <!--- Master Query --->

    <cfquery datasource = "XX.XX.X.XX" name="master2">

        SELECT STR_TO_DATE(date_format(Timedetail,'%m-%d-%Y'),'%m-%d-%Y') as SECONDCONN

               , COUNT(Timedetail) as SECONDOccurances

               , EVENTS

        FROM  MyDatabase

        WHERE EVENTS = "SECOND"

        GROUP BY SECONDCONN ;

    </cfquery>

    <!--- Detail Query --->

    <!--- <cfdump var = "#master#"> --->

    <cfquery dbtype="query" name="detail2">

        SELECT  *

        FROM   master2

        WHERE  SECONDCONN  >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar">

        AND    SECONDCONN  <  <cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">;

    </cfquery> 

   

   

    <cfchart format="flash"  chartwidth="1000" chartheight="500" scalefrom="0" scaleto="50000" xAxisTitle="Dates" yaxistitle="Number of Connections">

         <cfchartseries  query="detail1" type="line" itemColumn="FIRSTCONN" valueColumn="FIRSTOccurances" >

         <cfchartseries  query="detail2" type="line" itemColumn="SECONDCONN" valueColumn="SECONDOccurances" >

         </cfchartseries>

    </cfchart>

      

      

On X Axis, the chart is displaying the correct `startdate` but it stops displaying the dates after middle point somewhere and rest of the line chart is displayed without any dates mentioned on the x-axis. What could be the reason? The dates are displaying properly when I ran just one query, that is QoQ for `FIRSTCONN`.

![Image #1][1] attached  shows the output with only one query , that is QoQ for `FIRSTCONN`

![Image #2][2] is for the both and showing undesirable output.

Another point I noticed is that when I run the query for only SECONDCONN, I see an output without any dates mentioned on the x-axis. What could be th reason? I have attached ![image #3][3] below for the reference.there is no change in the query.

Please let me know if I can answer more questions.

  [1]: http://i.stack.imgur.com/xDpCw.jpg

  [2]: http://i.stack.imgur.com/RXfwD.jpg

  [3]: http://i.stack.imgur.com/qYQVY.jpg

410
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources