Re: cfchart and bar colors
Thanks ofr the suggestion. Ray Camden helped me on this one, and ended up blogging about it. Here's the link to Ray's blog post on it: http://www.coldfusionjedi.com/index.cfm/2010/3/12/Coloring-CFCHART-Dynamically The cfChartSeries attribute colorlist will allow a series of colors, but in this case the X axis is ordered by department name rather than by response percentage. Just sifting through a ton of old mailing list items .. I am sure you figured this out already. But for the archives, you could calculate the colorlist dynamically. A simple approach is using a CASE statement in your db query to determine the colors for each value. SELECT Department, ResponseValue, CASE WHEN ResponseValue BETWEEN 0 AND 49 THEN 'Red' -- in hex ... WHEN ResponseValue BETWEEN 50 AND 74 THEN 'Orange' ... etc... END AS BarColor ... or store the color range information in a db table and use a JOIN. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332953 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfchart and bar colors
Thanks ofr the suggestion. Ray Camden helped me on this one, and ended up blogging about it. Here's the link to Ray's blog post on it: You inspired a blog entry, cool! Yes, I can see he was thinking along similar lines. Except he used CF versus SQL + valueList(query.BarColor). Nice follow-up for the archives :) Cheers -Leigh ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332960 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfchart and bar colors
The cfChartSeries attribute colorlist will allow a series of colors, but in this case the X axis is ordered by department name rather than by response percentage. Just sifting through a ton of old mailing list items .. I am sure you figured this out already. But for the archives, you could calculate the colorlist dynamically. A simple approach is using a CASE statement in your db query to determine the colors for each value. SELECT Department, ResponseValue, CASE WHEN ResponseValue BETWEEN 0 AND 49 THEN 'Red' -- in hex ... WHEN ResponseValue BETWEEN 50 AND 74 THEN 'Orange' ... etc... END AS BarColor ... or store the color range information in a db table and use a JOIN. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332937 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfchart and bar colors
--- bump --- ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331667 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfchart and bar colors
Greeting, I have a cfchart where we display percent responses by department. While cfchartseries will set the colour for all the bars, the powers that be want the color to be different for each bar depending on the response percentage, as in:. 0 - 49 % red 50-74% orange 75%-89% green 90%+ blue The cfChartSeries attribute colorlist will allow a series of colors, but in this case the X axis is ordered by department name rather than by response percentage. So at this point I'm at a bit of a loss on how to do this, so any help would be very much appreciated. thx, larry ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331613 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfchart and bar colors...
Does Anyone know off hand if cfchart supports a different color for each bar in a bar chart? Brook At 05:01 PM 12/10/2002 -0700, you wrote: Assuming you can reliably determine which IP addresses go with which country, it should be fairly easy using CGI.remote_addr (which gives you their IP address). Of course, what if an Australian user is on vacation in the US and wants to see the Australian page? I'd suggest still giving the users the option to go to other country pages (so the aforementioned Aussie will initially get the US page but can switch go the Australian pages [and keep the preference with a cookie/session variable]). Scott Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.