Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Without seeing a dump of the query data, my guess is the charting engine may have decided there are too many values to reasonably display on the x-axis. (I tested your code and it works fine with CF9). Try it with a smaller date range and see if the date labels reappear. If so, you may need to <a href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-74f2.html" rel="nofollow">customize the chart settings</a> to get a better fit. Here are some of the pertinent style settings. </p> <ul> <li><a href="http://www.raymondcamden.com/index.cfm/2006/2/10/CFCHART-and-the-Case-of-the-Disappearing-Labels" rel="nofollow"><code>isHideOverlapped</code></a> - hide/show labels that overlap </li> <li><code>skipLabels</code> - adjust to display every <code>n</code> labels instead of all</li> <li><code>orientation</code> - label orientation (horizontal or vertical)</li> </ul> <p><strong>Test Code</strong></p> <pre><code>&lt;cfset detail1 = queryNew("")&gt; &lt;cfset queryAddColumn(detail1, "FIRSTCONN", "date", listToArray("2013-07-31,2013-08-15,2013-08-17"))&gt; &lt;cfset queryAddColumn(detail1, "FIRSTOccurances", listToArray("3,5,6"))&gt; &lt;cfset detail2 = queryNew("")&gt; &lt;cfset queryAddColumn(detail2, "SECONDCONN", "date", listToArray("2013-08-10,2013-08-18,2013-08-20"))&gt; &lt;cfset queryAddColumn(detail2, "SECONDOccurances", listToArray("4,10,8"))&gt; &lt;cfchart format="flash" xAxisTitle="Dates" yaxistitle="Number of Connections"&gt; &lt;cfchartseries query="detail1" type="line" itemColumn="FIRSTCONN" valueColumn="FIRSTOccurances" /&gt; &lt;cfchartseries query="detail2" type="line" itemColumn="SECONDCONN" valueColumn="SECONDOccurances" /&gt; &lt;/cfchart&gt; </code></pre> <blockquote> <p>QoQ is faster and that's why I'm using it.</p> </blockquote> <p>Honestly, that is not a good approach for handling a slow running queries. The best place to optimize a db query is <em>in the database</em>. Take the time to examine the query plan and find the bottleneck, add the appropriate indexes, etcetera. By using QoQ's you incur a lot of extra network o/h by pulling back a lot of extra data that is ultimately discarded. Not to mention, the memory required to build a new resultset. It is a lot of wasted resources and will not scale well.</p> <p>(That said, I believe you have already opened a separate thread regarding the query speed. So rather than mixing questions again, I will leave that conversation for your other thread.)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload