Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

cfchart label disappears after sometime on x-axis

$
0
0

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


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>