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 customize the chart settings to get a better fit. Here are some of the pertinent style settings.
isHideOverlapped
- hide/show labels that overlap
skipLabels
- adjust to display every n
labels instead of all
orientation
- label orientation (horizontal or vertical)
Test Code
<cfset detail1 = queryNew("")>
<cfset queryAddColumn(detail1, "FIRSTCONN", "date", listToArray("2013-07-31,2013-08-15,2013-08-17"))>
<cfset queryAddColumn(detail1, "FIRSTOccurances", listToArray("3,5,6"))>
<cfset detail2 = queryNew("")>
<cfset queryAddColumn(detail2, "SECONDCONN", "date", listToArray("2013-08-10,2013-08-18,2013-08-20"))>
<cfset queryAddColumn(detail2, "SECONDOccurances", listToArray("4,10,8"))>
<cfchart format="flash" xAxisTitle="Dates" yaxistitle="Number of Connections">
<cfchartseries query="detail1" type="line" itemColumn="FIRSTCONN" valueColumn="FIRSTOccurances" />
<cfchartseries query="detail2" type="line" itemColumn="SECONDCONN" valueColumn="SECONDOccurances" />
</cfchart>
QoQ is faster and that's why I'm using it.
Honestly, that is not a good approach for handling a slow running queries. The best place to optimize a db query is in the database. 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.
(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.)