Hey James,

You can use CASE statements in the SQL to handle the NULL values and replace
them with 0 which means the points still get plotted at the bottom of the
graph and look as its supposed to.

I've used this method before on my application solve the same problem so it
defiantly works and is a nice efficient way to solve the problem.

Rob
-----Original Message-----
From: James Smith [mailto:[EMAIL PROTECTED] 
Sent: 08 October 2007 12:46
To: CF-Talk
Subject: RE: Graphing date ranges...

I did think about something like this but the problem is that when you chart
data with missing data the line just stops and starts over the missing info,
it doesn't interpolate the gaps.  This means if it gets data like...

2007/10/01 - 15
2007/10/02 - null
2007/10/03 - 17
2007/10/04 - null
2007/10/05 - null
2007/10/06 - 12

The chart would then show nothing at all because it will try to render 3
disconnected dots which will not display anything.

--
Jay

-----Original Message-----
From: Robert Rawlins - Think Blue
[mailto:[EMAIL PROTECTED] 
Sent: 08 October 2007 11:45
To: CF-Talk
Subject: RE: Graphing date ranges...

Hey pal,

If you're looking to fill in the holes where there is no data for a
particular date the best way to do this is with a Calendar table in your
database, you can then select the desired date range from this and LEFT
OUTTER JOIN it to your table with your statistics data, that way It'll
return a row for every date in the range, regardless of whether you have
data for that date or not, so you get no gaps.

It's more of a SQL type thing so you might be better off asking there, and
looking around for some help building and populating a Calendar table, it's
not an overly complicated task, but a calendar table will really help you
out for this and many other tasks too, I'd highly recommend one.

Let me know if you need any more help Jay,

Rob

-----Original Message-----
From: James Smith [mailto:[EMAIL PROTECTED] 
Sent: 08 October 2007 10:44
To: CF-Talk
Subject: Graphing date ranges...

I have a cfchart displaying dates along the X axis, is there any way to get
ColdFusion to treat these as a scale so that a 7 day gap in the data would
stretch the graph out to interpolate the missing days?

CFChart does have an "xAxisType" attribute but to set it to scale the data
must be numeric and I really want to keep the data displaying as formatted
dates.

--
Jay

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.4/1056 - Release Date: 07/10/2007
18:12
 








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290535
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to