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 ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290527 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
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 ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290532 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Graphing date ranges...
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
RE: Graphing date ranges...
Problem is I need the line to be interpolated not dropped to 0 so for example for the data 2007/10/01 - 15 2007/10/02 - null 2007/10/03 - 17 I need the line to go through 16 on the 2nd not drop to zero and come back up again. -- Jay -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: 08 October 2007 13:00 To: CF-Talk Subject: RE: Graphing date ranges... 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:290538 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Graphing date ranges...
I second that suggestion. http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:277365 M!ke -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: Monday, October 08, 2007 5:45 AM 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 ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290545 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4