CFCHART - Scalefrom & ScaleTo - CF7
Hi Folks -
I am working on a line chart and I am trying to dynamically
set the ScaleFrom and the ScaleTo fields.
I can do the logic to calculate the values, but when I set
them, the chart values get set to the high and low of the values
from the chartseries.
Even if I hard code the values, the chart still defaults to
values of the graph.
If my values are under 1000, then the programming works, but
as soon as the values break into the 1000s or 10,000s the chart
defaults to the chart values. I also display my high and low values
to verify my programming is working correctly.
Does anybody know what the heck is happening?
Thanks,
Doug
You can specify scaleFrom and scaleTo by hardoced values or
dynamic variables and number of gridlines. If you not specified
first two attributes, then by default, the minimum is 0 or the
lowest negative chart data value, and the maximum is the largest
data value.
To avoid decimals in your case empirically find good
combination for your scale, for example from - 500 to 10 000 and
number of gridlines = 12.
Similar Messages
-
Different CFCHART output in CF7 and CF9
Hi,
I'm testing CF9 (at the moment I'm on CF7) and I notice that the output of charts with multiple chartseries in CF9 is wrong.
The chart is displayed multiple times.
See my code:
<cfquery name="select_kp" >
select id,code, name
from cdb_request_schedule_kp
</cfquery>
<cfquery name="select_qb_kp">
select a.krit_punkt_id, code, name,
count(*) anzahl
from cdb_request_schedule a, cdb_request_schedule_kp b
where a.krit_punkt_id = b.id
and termin_ist between to_date('01.01.2009','dd.mm.yyyy') and to_date('31.12.2009','dd.mm.yyyy')
group by krit_punkt_id, code,name
</cfquery>
<cfloop list="#valueList(select_kp.code)#" delimiters="," index="n">
<cfquery name="select_qb_kp_#n#" dbtype="query">
select krit_punkt_id,code,name,anzahl from select_qb_kp
where code = '#n#'
</cfquery>
</cfloop>
<cfchart
chartwidth="600"
chartheight="350"
xaxistitle="critical point"
yaxistitle="Number"
showborder="yes">
<cfloop list="#valueList(select_kp.code)#" delimiters="," index="n">
<cfchartseries
type="bar"
query="select_qb_kp_#n#"
itemcolumn="code"
valuecolumn="anzahl"
serieslabel="#n#"/>
</cfloop>
</cfchart>
Please see the attached file .
Is it a bug in CF9 or what's wrong?
best regards
claudiaHi Keshav and jelena
The exit got called ( EXIT_SAPLKAEP_001) but the structure CS_RECORD is not coming as fully filled and that is the reason why the values are not coming . Now I need to understand why the structure in background and foreground is coming different
The code is simple written in the exit . In the following code BLART is not coming but when suppose I change the value of ZZACT_COST in debugging mode then also its coming 0 only in the spool.
Here are the following code
IF CS_RECORD-VRGNG EQ L_C_KZPI.
*Get Overhead cost
CS_RECORD-ZZOVRHD_COST = CS_RECORD-WKGBTR.
ELSE.
IF CS_RECORD-BLART NE L_C_BLART_SW AND CS_RECORD-BLART NE L_C_BLART_SS
AND CS_RECORD-BLART NE L_C_BLART_SZ AND CS_RECORD-WRTTP EQ L_C_WRTTP.
IF CS_RECORD-KSTAR EQ L_C_KSTAR.
*Get Actual Revenue
CS_RECORD-ZZACT_REVENUE = CS_RECORD-WKGBTR.
ELSEIF CS_RECORD-VRGNG NE L_C_KOAO.
*Get Actual cost
CS_RECORD-ZZACT_COST = CS_RECORD-WKGBTR.
ENDIF.
ENDIF.
ENDIF.
Please suggest somethng -
How to create trend line in cfchart?
I can create a scatter chart in cfchart - but I do not know how to create a linear regression trend line in the same chart as a second data series. Kodemonki provided an answer in a forum discussion a few years ago (http://forums.adobe.com/message/192848#192848) - but I am not able to make it work (I have a dangerously small knowledge of coldfusion and statisitcal formulas). Can someone tell me where i put in my to data query variables - such as for a query that gives results for two data fields, "Item1" and "Item2".
Here is Kodemonki's solution:
<!--- The min setting is a preference based on how you want the data to be displayed. --->
<!---<cfset min = arrayMin(grabData["value"]) - 5>--->
<cfset min = 0>
<cfset max = ceiling(arrayMax(grabData["value"])) + 1>
<cfset n = grabData.recordCount>
<cfset sum_x = 0>
<cfset sum_x2 = 0>
<cfset sum_xy = 0>
<cfloop from="1" to="#grabData.RecordCount#" index="i">
<cfset sum_x = sum_x + i>
<cfset sum_xy = (i*grabData.value[i]) + sum_xy>
<cfset sum_x2 = sum_x2 + (i*i)>
</cfloop>
<cfset sum_y = arraySum(grabData["value"])>
<cfset slope = round(((n*sum_xy) - (sum_x*sum_y))/((n*sum_x2) - (sum_x*sum_x)))>
<cfset intercept = round((sum_y - (slope*sum_x))/n)>
<cfset best_fit = QueryNew("id, value")>
<cfloop from="1" to="#grabdata.RecordCount#" index="i">
<cfset queryAddRow(best_fit)>
<cfset value = round((slope*i) + intercept)>
<cfset QuerySetCell(best_fit, "id", grabData.xlabel[i])>
<cfset QuerySetCell(best_fit, "value", value)>
</cfloop>
<cfchart scalefrom="#min#" scaleto="#max#" title="#GrabDatapointInfo.label#" format="jpg" chartHeight="450" chartwidth="500" xaxistitle="Month/Year">
<cfchartseries type="line" query="best_fit" valuecolumn="value" itemcolumn="id"/>
<cfchartseries type="line" query="grabData" valuecolumn="value" itemcolumn="xlabel"/>
</cfchart>Have you read the docs for CFCHART, CHCHARTSERIES, etc? Did you mess around with the example code sufficiently so you understand how the tags work?
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-79 30.html
Adam -
How to create a trend line in cfchart?
I can create a scatter chart in cfchart - but I do not know how to create a linear regression trend line in the same chart as a second data series.
Kodemonki provided an answer in a forum discussion a few years ago (http://forums.adobe.com/message/192848#192848).
But I am not able to make it work (I have a dangerously small knowledge of coldfusion and statisitcal formulas).
Can someone tell me where i put in my to data query variables - such as for a query that gives results for two data fields, "Item1" and "Item2".
Thanks!
Here is Kodemonki's solution:
<!--- The min setting is a preference based on how you want the data to be displayed. --->
<!---<cfset min = arrayMin(grabData["value"]) - 5>--->
<cfset min = 0>
<cfset max = ceiling(arrayMax(grabData["value"])) + 1>
<cfset n = grabData.recordCount>
<cfset sum_x = 0>
<cfset sum_x2 = 0>
<cfset sum_xy = 0>
<cfloop from="1" to="#grabData.RecordCount#" index="i">
<cfset sum_x = sum_x + i>
<cfset sum_xy = (i*grabData.value[i]) + sum_xy>
<cfset sum_x2 = sum_x2 + (i*i)>
</cfloop>
<cfset sum_y = arraySum(grabData["value"])>
<cfset slope = round(((n*sum_xy) - (sum_x*sum_y))/((n*sum_x2) - (sum_x*sum_x)))>
<cfset intercept = round((sum_y - (slope*sum_x))/n)>
<cfset best_fit = QueryNew("id, value")>
<cfloop from="1" to="#grabdata.RecordCount#" index="i">
<cfset queryAddRow(best_fit)>
<cfset value = round((slope*i) + intercept)>
<cfset QuerySetCell(best_fit, "id", grabData.xlabel[i])>
<cfset QuerySetCell(best_fit, "value", value)>
</cfloop>
<cfchart scalefrom="#min#" scaleto="#max#" title="#GrabDatapointInfo.label#" format="jpg" chartHeight="450" chartwidth="500" xaxistitle="Month/Year">
<cfchartseries type="line" query="best_fit" valuecolumn="value" itemcolumn="id"/>
<cfchartseries type="line" query="grabData" valuecolumn="value" itemcolumn="xlabel"/>
</cfchart>Have you read the docs for CFCHART, CHCHARTSERIES, etc? Did you mess around with the example code sufficiently so you understand how the tags work?
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-79 30.html
Adam -
Images not displaying in CFDOCUMENT PDF
Hi there,
Has anyone notice any problems with images in dynamic PDF
using CFDOCUMENT? I have a site where I create several dynamic PDF
document (with images) and all of a sudden, they stop displaying.
The only new addition was a SSL for the site.
Any help would be greatly appreciated.Thanks, Isaac.
My reason for posting that I was trying the src="file://E:\ solution before putting it in CFDocument was that I figured if it didn't work with the browser, it probably wouldn't work with CFDocument, which was probably presumptuous of me. I just tried using the IP Address instead of E:\etc and it shows up in the browser. Good news, the IP Addresses fix the logo problem, but not the CFChart problem.
Here's the failed img tag:
<img src="logo_30.jpg" width="96" height="50" border="0" alt="">
Here's the successful img tag:
<img src="http://ipaddress/portal/PROD/Forms/monthly_reports/logo_30.jpg" width="96" height="50" border="0" />
Here's the chart code:
<CFQUERY NAME="GrabData" datasource="admi-prod">
sql goes here
</CFQUERY>
<cfset gwidth = 450>
<cfset gheight = 320>
<cfset min = int(arrayMin(grabData["total_inventory"])) - 1>
<cfif int(arrayMin(grabData["total_idle_capital"])) LT min>
<cfset min = int(arrayMin(grabData["total_idle_capital"])) - 1>
</cfif>
<cfset max = ceiling(arrayMax(grabData["total_inventory"])) + 1>
<cfchart scalefrom="#min#" scaleto="#max#" title="Total Closing Inventory & Total Idle Capital" format="jpg" chartheight="#gheight#" chartwidth="#gwidth#">
<cfchartseries type="line" query="grabData" valuecolumn="total_inventory" itemcolumn="xlabel"/>
<cfchartseries type="line" query="grabData" valuecolumn="total_idle_capital" itemcolumn="xlabel"/>
</cfchart> -
Are the Low and High ends of the Y axis, variables in
ColdFusion? If so, what are their names?
here's an exerpt of my chart:
<cfchart scalefrom="#SmallestDataValue#">
<cfquery name="getData" datasource="#DataSource#" />
<cfchartseries type="scatter" query="getData"
itemcolumn="Q"
valuecolumn="Lw" />
</cfchart>
It would be great if I could use these values to keep limit
any additional lines to stay within the existing scale of my
data.Mercie,
Welcome to SCN!!
That is how a chart works, when there is huge difference in values displayed on Y Axis...it will not showup when it is set to Auto, and when it is set to manual you will notice that the graph is compressed.
-Anil -
Cfchart scaleto still doesn't work in CF8?
I saw numerous posts on here and other forums about how the
'scaleto' attribute in cfchart doesn't work right in CF7. But, I'm
having the same problems with CF8. It still hasn't been fixed?
I'm following along with Ben Forta's CF8 WACK in chapter 16
listing 16.4. The data is from his ows database. There is actually
an error in his code, where the 'scaleto' is set to 1500000, but
the highest value from the database goes to '800000000', so I
changed the 'scaleto' to '1000000000'. The crazy thing is, figure
16.4 in the book shows the upper limit at 1 billion, just like it's
supposed to work, but it doesn't work for me.
I saw another post that said it worked fine when they removed
the labelformat="currency" attribute, and sure enough, when removed
it works just fine (albeit without the proper formatting). Does
Adobe plan on ever actually fixing cfchart in any CF release?
I'm using: CF801 developer edition on Vista (sp1) and the CF8
internal web server. The code is below, but I'm assuming others
have this book and have tried it? Anyone else still having issues
with 'scaleto' in CF8?
<!--- This defines the size and appearance of the chart
--->
<cfchart chartwidth="750"
chartheight="450"
yaxistitle="Budget"
<!--- 3D appearance --->
show3d="yes"
xoffset=".04"
yoffset=".04"
<!--- Fonts and colors --->
showborder="yes"
foregroundcolor="003366"
backgroundcolor="99dddd"
databackgroundcolor="66bbbb"
tipbgcolor="ffff99"
fontsize="11"
fontbold="yes"
fontitalic="yes"
<!--- gridlines and axis labels --->
scalefrom="0"
scaleto="1000000000"
gridlines="6"
showygridlines="yes"
labelformat="currency">
<!--- within the chart --->
<cfchartseries type="bar"
seriescolor="green"
serieslabel="Budget Details:"
query="chartquery"
valuecolumn="amountbudgeted"
itemcolumn="movietitle"
paintstyle="light">
</cfchart>I appear to have solved at least part of my problem. In addition to running the application firewall that's accessible from System Preferences, I run ipfw via the WaterRoof frontend. I have my firewall rules carefully crafted to my needs, including open ports for iTunes sharing, Bonjour, etc., all according to Apple's documentation.
However, I don't see anywhere that they've documented this. On disabling the ipfw firewall, I found AirPlay worked again. Further testing and examination of the logs revealed that the Mac had been denying inbound packets coming from the AirPort Express and destined for UDP port 6002. So far I can find no official documentation saying iTunes or AirPlay uses that port, but allowing it through the firewall seems to have worked. This wasn't necessary in earlier versions of iTunes, and I'm not sure why it has changed now.
I haven't tested streaming to the iPhone yet. -
CFCHART - Line Chart Questions - CF7
Hi Folks -
I have a few questions about CFCHART in CF 7 and I am hoping
that maybe different users can answer them:
The following questions relate to creating a line chart.
1) Is there a way to control the gridlines yourself, and not
use the values for the lines that CFCHART presents?
1A) If you have to accept the values that CFCHART gives you,
is there a way to control the actual rounding of the values? Right
now I am getting 3 decimal places, and I would prefer whole
numbers.
2) Is there an issue with displaying negative values? I have
a chart that ranges from -255 to 100,000 and has 10 grid lines. But
the -255 does not display. I get 0, the rest of the lines, except
for the 9th line.
<cfchart chartheight="300" chartwidth="450" font="@Arial
Unicode MS" scalefrom="-255" scaleto="100000"
gridlines="10" xaxistitle="Month" yaxistitle="Total"
format="png" labelformat="number">
<cfchartseries type="line" serieslabel="Review">
<cfchartdata item="Jan" value="2569">
<cfchartdata item="Feb" value="65535">
<cfchartdata item="March" value="-57">
<cfchartdata item="April" value="75778">
<cfchartdata item="May" value="89955">
<cfchartdata item="June" value="39898">
<cfchartdata item="July" value="0">
<cfchartdata item="August" value="12560">
<cfchartdata item="Sept" value="-255">
<cfchartdata item="Oct" value="767">
<cfchartdata item="Nov" value="6868">
<cfchartdata item="Dec" value="37352">
</cfchartseries>
</cfchart>
Any and all questions and answers are appreciated.
Thanks,
DougYou can specify scaleFrom and scaleTo by hardoced values or
dynamic variables and number of gridlines. If you not specified
first two attributes, then by default, the minimum is 0 or the
lowest negative chart data value, and the maximum is the largest
data value.
To avoid decimals in your case empirically find good
combination for your scale, for example from - 500 to 10 000 and
number of gridlines = 12. -
Cfchart Tip Formatting CF6 vs CF7 ?!
Hello all. Trying to figure out how to retain the formatting
of the tips on my charts as they were in CF6?!
Here's a screenshot:
http://www.kineticapproach.com/cf/cf6vs7_chart_tips.jpg
Any help would be greatly appreciated.
Thanks in advance!quote:
Originally posted by:
-==cfSearching==-
You could
create
your own custom style file and modify the popup properties. The
WebCharts3D
utility is also quite helpful. Bear in mind some properties may
not be supported in cfchart.
<popup decoration="Shadow" background="#FFFFCC"
isAntialiased="true"
font="Verdana-12"
foreground="black" isMultiline="true"/>
Thanks for the response, which was helpful... however, what I
am trying to figure out is how to left justify the text as shown in
the CF6 image here:
http://www.kineticapproach.com/cf/cf6vs7_chart_tips.jpg
I can't seem to find an appropriate attribute to fix
this. -
Hey All,
I've just recently started with coldfusion and I'm trying to make some nice charts for representing past server activity.
I've used webcharts to gerenate a style file (see below) but it comes out looking like this:
This is mostly what I want but the labels at the bottom are very strange, I know I'm passing it too many datapoints to display all the labels but it really goes quite funny towards the end, I don't really want to pass it less data points because this is pretty much as granular as I require. I can't find the right options to get this looking right, does anybody know if I can remedy this or if it's just a bug of some kind?
My CFCHART syntax is as follows:
<cfchart format="png"
chartwidth="#chart_width#"
chartheight="#chart_height#"
labelformat="number"
yaxistitle="#server_tests[y].getFriendlyName()#"
xaxistitle="Timestamp"
style="../../view/charts/chart.xml">
<cfchartseries type="#server_tests[y].getChartType()#"
query="my_query"
valuecolumn="value"
itemcolumn="timestamp" />
</cfchart>
My chart.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<frameChart>
<frame xDepth="0" yDepth="0" outline="black" frameSize="30"
dashSize="6" isVGridVisible="true" stripColor="white">
<background minColor="#FDFEF6"/>
</frame>
<legend isVisible="false" />
<xAxis isAntialiased="true">
<labelStyle isMultiline="false" isHideOverlapped="true" orientation="Vertical"/>
<titleStyle margin="10" font="Verdana-10-bold" />
</xAxis>
<yAxis isAntialiased="true">
<titleStyle margin="10" font="Verdana-10-bold" />
</yAxis>
<elements place="Stacked" shape="Step" outline="#8000FF" markerSize="1"
shapeSize="60" drawOutline="false" drawShadow="false">
<morph morph="None" stage="None"/>
</elements>
</frameChart>
Any ideas would be greatly appreciated!
Cheers,
OP@cfsearching: Thanks for that link, it looks very useful! I'll certainly try that when I get into work on monday. I'll update with my results.
@pirula: I have tried flash as well as other image formats but it looks identical (which is actually pretty amazing, I think). I need to use an image-type for now anyway because I'm converting the same page to PDF and flashpaper with CFDOCUMENT - I don't know if they'll include the graphs properly if I chose flash for the CFCHARTs
Thanks for your input ,
OP -
Image File Caching Issue\CF6 vs CF7
Why doesn't this work in CFMX7, but it works in CFMX6?
<img
src="<cfoutput>#request.testImage#</cfoutput>" alt=""
border="0">
It seems the src attribute for img needs to have the file
name in it somewhere.
Problem is it doesn't want to grab the latest image from the
file location, it seems to keep using the one that is cached while
in an instance of the browser prior to refreshing the page or
closing the broswer and coming back in. In CF6 the latest image is
grabbed showing the newly created image from the chart tag. In CF7
an X is displayed. Here is the code:
<cfset thisPath=ExpandPath("../")>
<cfset serverDirectory=GetDirectoryFromPath(thisPath)>
<cfchart format="png" chartheight="150" chartwidth="500"
showxgridlines="yes" showygridlines="yes" gridlines="#GL#"
seriesplacement="cluster" databackgroundcolor="##DDDDDD"
showborder="no" fontsize="10" fontbold="no" fontitalic="no"
show3d="yes" xoffset=".01" yoffset=".01" rotated="no"
sortxaxis="yes" showlegend="yes" showmarkers="no"
pieslicestyle="sliced" scalefrom="0" scaleto="#rangeto#"
name="myChart">
<cfchartseries type="bar" query="Appcount1"
itemcolumn="app" valuecolumn="ct" serieslabel="Tier 1"
Seriescolor="red">
<cfchartseries type="bar" query="Appcount2"
itemcolumn="app" valuecolumn="ct" serieslabel="Tier 2"
Seriescolor="green">
<cfchartseries type="bar" query="Appcount3"
itemcolumn="app" valuecolumn="ct" serieslabel="Tier 3"
Seriescolor="blue">
</cfchart>
<!--- Save chart --->
<cfset request.chartImage =
"#serverDirectory#IRIS\images\chartImage.png">
<cfif FileExists("#request.chartImage#") is "Yes">
<cffile action="DELETE" charset="ISO-8859-1"
file="#request.chartImage#">
</cfif>
<cffile action="WRITE" charset="ISO-8859-1"
file="#request.chartImage#" output="#myChart#">
<!--- create the graph for the total count by app --->
<p align="center"><img
src="<cfoutput>#request.chartImage#</cfoutput>" alt=""
border="0"></p>
The below works in both CF6 and CF7, but the latest image
isn't grabbed that is generated from the cfchart tag.
<p align="center"><img
src="<cfoutput>#request.images#</cfoutput>chartImage.png"
alt="" border="0"></p>Instead of importing the TIF file back into your FCP project, try just making a still frame (Shift n) of the same frame and use that in FCP. Use the exported TIF for your DVD menu. Note that when you make a freeze frame, any filters that had been applied to the clip will not be applied to the freeze frame. To remedy that, copy the clip, then right-click on the freeze frame and choose Paste Attributes / Filters.
-DH -
I was wondering is there a way to show chart point values so that the values always show instead of just on mouseover? Right now I'm using cfchart and having it render as a Flash movie. Here's my code below.
<cfchart
format="flash"
scalefrom="500"
scaleto="5000"
show3D="No"
chartWidth="750"
chartHeight="300"
labelFormat = "currency"
showmarkers="yes"
title = "Funding"
yAxisTitle = "Dollars"
xAxisTitle="Year"
markerSize = "5">
<cfchartseries
type="line"
paintStyle="light"
serieslabel="Funding"
seriescolor="0f7196">
<cfchartdata item="2006 - 07" value="3983">
<cfchartdata item="2007 - 08" value="3670">
<cfchartdata item="2008 - 09" value="3070">
<cfchartdata item="2009 - 10" value="2703">
</cfchartseries>
</cfchart>http://www.coldfusionjedi.com/index.cfm/2009/3/6/Ask-a-Jedi-Showing-the-values-on-a-chart
-
Formatted Data Labels in CFCHART
Is there a way to format data values in CFCHART?
All my values in database are stored as 99.9 See below). These are percentages that I need to display on a bar chart. Everything works fine except when displaying 76.0, it shows as 76. All other values that have a number besides zero after the decimal point show up fine except for zero. I want the numbers to be consistent. I am already using custom XML file for formatting but unable to display the "zero" after the decimal point.
Let's assume, StartYear = 2007 and EndYear = 2008, and the data in Influencer_Data table looks like this:
ID Poll_Year Company Influence_ID Pulse Goal
96 2008 XYZ 842 59.6 59.6
97 2008 XYZ 839 80.8 80.8
98 2008 XYZ 838 86.9 86.9
99 2008 XYZ 841 67.1 67.1
100 2008 XYZ 840 66.3 66.3
101 2008 XYZ 470 54.5 54.5
102 2007 XYZ 842 56.5 56.5
103 2007 XYZ 839 81.5 81.5
104 2007 XYZ 838 85.5 85.5
105 2007 XYZ 841 71.2 71.2
106 2007 XYZ 840 76.0 76.0
107 2007 XYZ 470 54.2 54.2
108 2008 XYZ 843 82.6 82.6
And the data in influencers table looks like this:
Influencer_ID Influencer_Type
470 Regulators
838 Financial Community
839 Community Leaders
840 Media
841 Government
842 Advocates
843 Mexico
<cfloop index="i" from="#StartYear#" to="#EndYear#" step="1">
<CFQUERY NAME="GetInfluenceData#i#" DATASOURCE="#RMIDSN#">
Select ID.*, I.Influencer_Type
From Influencer_Data ID
INNER JOIN Influencers I ON ID.Influencer_ID = I.Influencer_ID
Where ID.Poll_Year = <cfqueryparam value="#i#" cfsqltype="CF_SQL_INTEGER">
AND ID.Company = 'XYZ'
Order By I.Influencer_Type
</CFQUERY>
</cfloop>
The custom XML file (TLRIS.xml) looks like this:
?xml version="1.0" encoding="UTF-8"?>
<frameChart isInterpolated="false">
<frame xDepth="4" yDepth="5" outline="black" isVGridVisible="true"/>
<xAxis>
<labelFormat pattern="#0.0"/>
</xAxis>
<yAxis>
<labelFormat pattern="#0.0"/>
<labelStyle orientation="Horizontal"/>
</yAxis>
<dataLabels style="Value" font="Arial-12" isMultiline="true">
<![CDATA[ $(value) ]]>
</dataLabels>
<legend allowSpan="true" equalCols="false" isMultiline="true"/>
<elements drawOutline="false">
<morph morph="Grow"/>
</elements>
<popup decoration="Round"/>
<paint palette="Fiesta" paint="Plain" isVertical="true" min="47" max="83"/>
<insets right="5"/>
</frameChart>
And the code for the graph is below:
<cfoutput>
<cfchart format="#ChartType#"
chartheight="300"
chartwidth="750"
scalefrom="0"
scaleto="100"
foregroundcolor="##000000"
databackgroundcolor="##ffffff"
font="Arial"
fontsize="10"
labelformat="number"
style="TLRIS.xml"
show3d="yes"
showlegend="yes"
tipstyle="mouseOver"
tipbgcolor="##FFFF00">
<cfloop index="i" from="#StartYear#" to="#EndYear#" step="1">
<cfset LoopCount = LoopCount + 1>
<cfset WhichColor = ListGetAt(colorlist, LoopCount)>
<cfchartseries
type="bar"
serieslabel="#i#"
seriescolor="#WhichColor#"
datalabelstyle="pattern">
<cfloop query="GetInfluenceData#i#">
<cfchartdata item="#Influencer_Type#" value="#Pulse#">
</cfloop>
</cfchartseries>
</cfloop>
</cfchart>
</cfoutput>mohadi wrote:
I have already done that with no success.
I am beginning to believe this may be a bug.
Even if you try something as simple as the following, the decimal points that have zeroes don't show
<cfchart style="beige">
<cfchartseries type="pie">
<cfchartdata item="New car sales" value="50.0">
<cfchartdata item="Used car sales" value="55.0">
<cfchartdata item="Leasing" value="56.5">
<cfchartdata item="Service" value="76.2">
</cfchartseries>
</cfchart>
Well that is the wrong kind of chart and it is not using the xml style. But it works perfectly with a bar chart, using a custom style. The values display exactly as you have them above.
<cfchart style="myPatternStyle.xml">
<cfchartseries type="bar">
<cfchartdata item="New car sales" value="50.0">
<cfchartdata item="Used car sales" value="55.0">
<cfchartdata item="Leasing" value="56.5">
<cfchartdata item="Service" value="76.2">
</cfchartseries>
</cfchart>
<!--- snippet from xml styles --->
.... other xml ....
<yAxis scaleMin="0">
<titleStyle font="Arial-12-bold"/>
<dateTimeStyle majorUnit="Year" minorUnit="Month"/>
<labelFormat style="Pattern" pattern="#,##0.0#######"/>
</yAxis>
.... other xml .... -
I have been running different reports for some time now with MX7. I just upgraded to CF9 and now my charts are not displaying properly and I can not figure out why. Nothing else has changed.
Here is the form submission:
<form action="pcostjust2NEW.cfm" method="post" name="form6" onSubmit="return validate()" target="_blank">
<input name="census" type="hidden" value=".99">
<input name="prevalence" type="hidden" value="0.073">
<input name="occurance" type="hidden" value=".28">
<input name="cost" type="hidden" value="2000">
<input name="boots" type="hidden" value="2">
<input name="facility" type="hidden" value="North west hospital">
<input name="bedCount" type="hidden" size="8" maxlength="4" value="123">
<input name="overall" type="hidden" value="7.3" size="5" maxlength="5">
<input name="heelOverall" type="hidden" value="2" size="5" maxlength="2">
<input name="cost1" type="hidden" size="10" value="2000.00">
<input name="percent1" type="hidden" size="5" maxlength="3" value="93">
<input name="cost2" type="hidden" size="12" value="45000.00">
<input name="percent2" type="hidden" size="5" maxlength="3" value="7">
<input name="bootcost7355" type="hidden" value="54.00" size="8" maxlength="5">
<input name="product" type="hidden" value="7355" checked="checked">
<input name="whatRate" type="hidden" value="1" checked="checked">
<!---<input value="Run Report" type="submit">--->
<img src="images/costJustificationThumb.jpg" alt="Cost justification sample report" style="border:1px solid #cccccc;">
<a href="#" onClick="document.form6.submit()" class="bdylnk">Sample Report</a>
This is the resulta page:
<cfif NOT IsDefined("form.whatrate")>
<script>
alert("Please select a pressure ulcer rate");
history.go(-1);
</script>
</cfif>
<cfif NOT IsDefined("form.product")>
<script>
alert("Please select a product");
history.go(-1);
</script>
</cfif>
<cfif form.whatRate EQ 1>
<cfset overall = #form.overall# / 100>
<cfset havePU = #form.bedcount# * #overall#>
<cfset haveHeels = #havePU# * #form.occurance#>
<cfelse>
<cfset heeloverall = #form.heelOverall# / 100>
<cfset haveHeels = #form.bedcount# * #heelOverall#>
</cfif>
<cfif form.product EQ 7300>
<cfset bootcost = #form.bootcost7300# * 2>
<cfelseif form.product EQ 7302>
<cfset bootcost = #form.bootcost7302# * 2>
<cfelseif form.product EQ 7355>
<cfset bootcost = #form.bootcost7355# * 2>
<cfelseif form.product EQ 7310>
<cfset bootcost = #form.bootcost7310# * 2>
<cfelse>
<cfset bootcost = #form.bootcost7312# * 2>
</cfif>
<cfset heelUlcerDays = #haveHeels# * 365>
<cfset patientDays = #heelUlcerDays# / 4.6>
<cfset percent1 = #form.percent1# / 100>
<cfset stage1or2 = #patientDays# * #percent1#>
<cfset percent2 = #form.percent2# / 100>
<cfset stage3or4 = #patientDays# * #percent2#>
<cfset stage1or2cost = stage1or2 * #form.cost1#>
<cfset stage1or2cost = NumberFormat(stage1or2cost, "__.__")>
<cfset stage3or4cost = stage3or4 * #form.cost2#>
<cfset stage3or4cost = NumberFormat(stage3or4cost, "__.__")>
<cfset prevalonCost = (#PatientDays# * #bootcost#) * 1.85>
<cfset totalCost = stage1or2cost + stage3or4cost>
<cfset totalsavings = totalcost - prevaloncost>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Heel Ulcer Cost Justification</title>
<style>
table { font-family:Arial, Helvetica, sans-serif;
font-size:12px;
</style>
<link rel="stylesheet" type="text/css" href="../styles/styleNew.css">
</head>
<body>
<center>
<cfoutput>
<!---Have PU's = #havePU#<br><br>
Have Heels = #haveheels#<br><br>
Heel Ulcer Days = #heelUlcerDays#<br><br>
Prevalon Cost = #DollarFormat(prevalonCost)#<br><br>
Stage 1 and 2 = #DollarFormat(stage1or2cost)#<br><br>
Stage 3 and 4 = #DollarFormat(stage3or4cost)#<br><br>
Total Cost = #DollarFormat(totalcost)#--->
<br>
<table width="750" border="1" cellpadding="5" cellspacing="0" bordercolor="##000000" bgcolor="##FFFFFF">
<tr>
<td colspan="2"><table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" align="center" valign="top">
<cfif form.product EQ 7300>
<img src="images/prevalon7300.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
<cfelseif form.product EQ 7302>
<img src="images/prevalon7302.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
<cfelseif form.product EQ 7355>
<img src="images/prevalon7355.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
<cfelseif form.product EQ 7310>
<img src="images/prevalon7310.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
<cfelse>
<img src="images/prevalon7312.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
</cfif></td>
<td width="600" align="center" valign="middle"><strong><span style="font-size:20px">Prevalon® Heel Protector Cost Justification Report<br>
Treatment Costs vs. Prevention Costs<br><br>
#form.facility#</span></strong></td>
</tr>
</table></td>
</tr>
<tr>
<td><strong> </strong></td>
<td><strong> </strong></td>
</tr>
<tr>
<td width="611">Average Facility Census</td>
<td width="113">#form.bedcount#</td>
</tr>
<tr>
<td>Annual Projected Cost of Heel Ulcer Treatment and Prevention Utilizing Prevalon</td>
<td>$#NumberFormat(prevalonCost)#</td>
</tr>
<tr>
<td>Projected Number of Patients with Stage I or II Heel Ulcers (93%<sup>1</sup>) </td>
<td>#NumberFormat(stage1or2, "__")#</td>
</tr>
<tr>
<td>Projected Treatment Cost Stage I or II Ulcers ($2K/each<sup>2</sup>)</td>
<td>$#NumberFormat(stage1or2cost)#</td>
</tr>
<tr>
<td>Projected Number of Patients with Stage III or IV Heel Ulcers (7%<sup>1</sup>)</td>
<td>#NumberFormat(stage3or4, "__")#</td>
</tr>
<tr>
<td>Projected Treatment Cost Stage III or IV Ulcers ($45K/each<sup>2</sup>)</td>
<td>$#NumberFormat(stage3or4cost)#</td>
</tr>
<tr>
<td>Total Projected Cost of Heel Ulcers</td>
<td>$#NumberFormat(totalcost)#</td>
</tr>
<tr>
<td><strong>Estimated Revenue Preservation (Projected Heel Ulcer Cost minus Treatment/Prevention Costs Incurred)</strong></td>
<td><strong>$#NumberFormat(totalsavings)#</strong></td>
</tr>
<tr>
<td colspan="2" align="center"><cfset prevalonCost = Round(prevalonCost)>
<cfset stage1or2cost = Round(stage1or2cost)>
<cfset stage3or4cost = Round(stage3or4cost)>
<tr>
<td colspan="2" align="center"><cfchart format="flash" chartheight="500" chartwidth="750" scalefrom="0" scaleto="100" seriesplacement="default" showborder="yes" labelformat="number" labelmask="dave" xaxistitle="" yaxistitle="Cost in U.S. Dollars" show3d="yes" tipstyle="mouseDown" pieslicestyle="sliced">
<cfchartseries type="bar" itemcolumn="#prevalonCost#" valuecolumn="#prevalonCost#" seriescolor="##2986af" datalabelstyle="value" paintstyle="plain" markerstyle="triangle"><cfchartdata item="Annual Cost of Prevalon" value="#prevalonCost#"></cfchartseries>
<cfchartseries type="bar" itemcolumn="#stage1or2cost#" valuecolumn="#stage1or2cost#" seriescolor="##b1e426" paintstyle="plain" markerstyle="triangle"><cfchartdata item="Projected Treatment Cost of Stage I and II" value="#stage1or2cost#"></cfchartseries>
<cfchartseries type="bar" itemcolumn="#stage3or4cost#" valuecolumn="#stage3or4cost#" seriescolor="##ebb023" paintstyle="plain" markerstyle="triangle"><cfchartdata item="Projected Treatment Cost of Stage III and IV" value="#stage3or4cost#"></cfchartseries>
</cfchart></td>
</tr>
</table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</center>
</body>
</html>I have been running different reports for some time now with MX7. I just upgraded to CF9 and now my charts are not displaying properly and I can not figure out why. Nothing else has changed.
Here is the form submission:
<form action="pcostjust2NEW.cfm" method="post" name="form6" onSubmit="return validate()" target="_blank">
<input name="census" type="hidden" value=".99">
<input name="prevalence" type="hidden" value="0.073">
<input name="occurance" type="hidden" value=".28">
<input name="cost" type="hidden" value="2000">
<input name="boots" type="hidden" value="2">
<input name="facility" type="hidden" value="North west hospital">
<input name="bedCount" type="hidden" size="8" maxlength="4" value="123">
<input name="overall" type="hidden" value="7.3" size="5" maxlength="5">
<input name="heelOverall" type="hidden" value="2" size="5" maxlength="2">
<input name="cost1" type="hidden" size="10" value="2000.00">
<input name="percent1" type="hidden" size="5" maxlength="3" value="93">
<input name="cost2" type="hidden" size="12" value="45000.00">
<input name="percent2" type="hidden" size="5" maxlength="3" value="7">
<input name="bootcost7355" type="hidden" value="54.00" size="8" maxlength="5">
<input name="product" type="hidden" value="7355" checked="checked">
<input name="whatRate" type="hidden" value="1" checked="checked">
<!---<input value="Run Report" type="submit">--->
<img src="images/costJustificationThumb.jpg" alt="Cost justification sample report" style="border:1px solid #cccccc;">
<a href="#" onClick="document.form6.submit()" class="bdylnk">Sample Report</a>
This is the resulta page:
<cfif NOT IsDefined("form.whatrate")>
<script>
alert("Please select a pressure ulcer rate");
history.go(-1);
</script>
</cfif>
<cfif NOT IsDefined("form.product")>
<script>
alert("Please select a product");
history.go(-1);
</script>
</cfif>
<cfif form.whatRate EQ 1>
<cfset overall = #form.overall# / 100>
<cfset havePU = #form.bedcount# * #overall#>
<cfset haveHeels = #havePU# * #form.occurance#>
<cfelse>
<cfset heeloverall = #form.heelOverall# / 100>
<cfset haveHeels = #form.bedcount# * #heelOverall#>
</cfif>
<cfif form.product EQ 7300>
<cfset bootcost = #form.bootcost7300# * 2>
<cfelseif form.product EQ 7302>
<cfset bootcost = #form.bootcost7302# * 2>
<cfelseif form.product EQ 7355>
<cfset bootcost = #form.bootcost7355# * 2>
<cfelseif form.product EQ 7310>
<cfset bootcost = #form.bootcost7310# * 2>
<cfelse>
<cfset bootcost = #form.bootcost7312# * 2>
</cfif>
<cfset heelUlcerDays = #haveHeels# * 365>
<cfset patientDays = #heelUlcerDays# / 4.6>
<cfset percent1 = #form.percent1# / 100>
<cfset stage1or2 = #patientDays# * #percent1#>
<cfset percent2 = #form.percent2# / 100>
<cfset stage3or4 = #patientDays# * #percent2#>
<cfset stage1or2cost = stage1or2 * #form.cost1#>
<cfset stage1or2cost = NumberFormat(stage1or2cost, "__.__")>
<cfset stage3or4cost = stage3or4 * #form.cost2#>
<cfset stage3or4cost = NumberFormat(stage3or4cost, "__.__")>
<cfset prevalonCost = (#PatientDays# * #bootcost#) * 1.85>
<cfset totalCost = stage1or2cost + stage3or4cost>
<cfset totalsavings = totalcost - prevaloncost>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Heel Ulcer Cost Justification</title>
<style>
table { font-family:Arial, Helvetica, sans-serif;
font-size:12px;
</style>
<link rel="stylesheet" type="text/css" href="../styles/styleNew.css">
</head>
<body>
<center>
<cfoutput>
<!---Have PU's = #havePU#<br><br>
Have Heels = #haveheels#<br><br>
Heel Ulcer Days = #heelUlcerDays#<br><br>
Prevalon Cost = #DollarFormat(prevalonCost)#<br><br>
Stage 1 and 2 = #DollarFormat(stage1or2cost)#<br><br>
Stage 3 and 4 = #DollarFormat(stage3or4cost)#<br><br>
Total Cost = #DollarFormat(totalcost)#--->
<br>
<table width="750" border="1" cellpadding="5" cellspacing="0" bordercolor="##000000" bgcolor="##FFFFFF">
<tr>
<td colspan="2"><table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" align="center" valign="top">
<cfif form.product EQ 7300>
<img src="images/prevalon7300.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
<cfelseif form.product EQ 7302>
<img src="images/prevalon7302.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
<cfelseif form.product EQ 7355>
<img src="images/prevalon7355.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
<cfelseif form.product EQ 7310>
<img src="images/prevalon7310.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
<cfelse>
<img src="images/prevalon7312.jpg" alt="Prevalon"><br><strong>Prevalon® #form.product#</strong>
</cfif></td>
<td width="600" align="center" valign="middle"><strong><span style="font-size:20px">Prevalon® Heel Protector Cost Justification Report<br>
Treatment Costs vs. Prevention Costs<br><br>
#form.facility#</span></strong></td>
</tr>
</table></td>
</tr>
<tr>
<td><strong> </strong></td>
<td><strong> </strong></td>
</tr>
<tr>
<td width="611">Average Facility Census</td>
<td width="113">#form.bedcount#</td>
</tr>
<tr>
<td>Annual Projected Cost of Heel Ulcer Treatment and Prevention Utilizing Prevalon</td>
<td>$#NumberFormat(prevalonCost)#</td>
</tr>
<tr>
<td>Projected Number of Patients with Stage I or II Heel Ulcers (93%<sup>1</sup>) </td>
<td>#NumberFormat(stage1or2, "__")#</td>
</tr>
<tr>
<td>Projected Treatment Cost Stage I or II Ulcers ($2K/each<sup>2</sup>)</td>
<td>$#NumberFormat(stage1or2cost)#</td>
</tr>
<tr>
<td>Projected Number of Patients with Stage III or IV Heel Ulcers (7%<sup>1</sup>)</td>
<td>#NumberFormat(stage3or4, "__")#</td>
</tr>
<tr>
<td>Projected Treatment Cost Stage III or IV Ulcers ($45K/each<sup>2</sup>)</td>
<td>$#NumberFormat(stage3or4cost)#</td>
</tr>
<tr>
<td>Total Projected Cost of Heel Ulcers</td>
<td>$#NumberFormat(totalcost)#</td>
</tr>
<tr>
<td><strong>Estimated Revenue Preservation (Projected Heel Ulcer Cost minus Treatment/Prevention Costs Incurred)</strong></td>
<td><strong>$#NumberFormat(totalsavings)#</strong></td>
</tr>
<tr>
<td colspan="2" align="center"><cfset prevalonCost = Round(prevalonCost)>
<cfset stage1or2cost = Round(stage1or2cost)>
<cfset stage3or4cost = Round(stage3or4cost)>
<tr>
<td colspan="2" align="center"><cfchart format="flash" chartheight="500" chartwidth="750" scalefrom="0" scaleto="100" seriesplacement="default" showborder="yes" labelformat="number" labelmask="dave" xaxistitle="" yaxistitle="Cost in U.S. Dollars" show3d="yes" tipstyle="mouseDown" pieslicestyle="sliced">
<cfchartseries type="bar" itemcolumn="#prevalonCost#" valuecolumn="#prevalonCost#" seriescolor="##2986af" datalabelstyle="value" paintstyle="plain" markerstyle="triangle"><cfchartdata item="Annual Cost of Prevalon" value="#prevalonCost#"></cfchartseries>
<cfchartseries type="bar" itemcolumn="#stage1or2cost#" valuecolumn="#stage1or2cost#" seriescolor="##b1e426" paintstyle="plain" markerstyle="triangle"><cfchartdata item="Projected Treatment Cost of Stage I and II" value="#stage1or2cost#"></cfchartseries>
<cfchartseries type="bar" itemcolumn="#stage3or4cost#" valuecolumn="#stage3or4cost#" seriescolor="##ebb023" paintstyle="plain" markerstyle="triangle"><cfchartdata item="Projected Treatment Cost of Stage III and IV" value="#stage3or4cost#"></cfchartseries>
</cfchart></td>
</tr>
</table>
<table>
<tr>
<td>
</td>
</tr>
</table>
</center>
</body>
</html> -
I'm using CF8 enterprise on Windows Server 2008 and CF8 developer on Windows Server 2003. I've never had problems getting images or cfcharts on my cfdocuments on my development server, but just yesterday got images to work on the production server by using file://ipaddress instead of the regular img src="img.jpg", but I still can't get the cfcharts to show up on the production server. With jpg and png the red x shows up, when I use flash, a blank box shows up. Does anyone have any hints?
The answer was here all along, I was just searching for the wrong things.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=graphing_10.html
http://forums.adobe.com/message/3233968
<cfloop from="1" to="5" index="i">
<cfmodule template="generateReportingGraphs.cfm" graphNum="#i#" dealer_id="#dealer_id#" month="#month#" year="#year#">
<img src="http://#ip_address#/portal/PROD/Forms/monthly_reports/#dealer_id#_chart_#i#.jpg">
</cfloop>
generateReportingGraphs:
<cfchart name="mychart" scalefrom="#min#" scaleto="#max#" showlegend="yes" title="Total Closing Inventory & Total Idle Capital" format="jpg" chartheight="#gheight#" chartwidth="#gwidth#">
<cfchartseries type="line" query="grabData" serieslabel="Total Inventory" valuecolumn="total_inventory" itemcolumn="xlabel"/>
<cfchartseries type="line" query="grabData" serieslabel="Idle Capital" valuecolumn="total_idle_capital" itemcolumn="xlabel"/>
</cfchart>
<cffile action="write" nameconflict="overwrite" file="#getdirectoryFromPath(getCurrentTemplatePath())##dealer_id#_chart_#graphnum#.jpg" output="#mychart#">
Maybe you are looking for
-
Use Of "#EC CI_EXECSQL in ABAP with EXEC SQL. Statement giving Syntax Error
Dear Gurus, I have encountered an issue while trying to remove warning for using Native SQL statement using pseudo comment "#EC CI_EXECSQL The thing is like this -- i have used follwing native sql command in abap. EXEC SQL. CONNECT TO 'SURROUND_D
-
CS6 Indesign files not fully loading
I have just purchased CS6 and created a few InDesign files. Now, on numerous occasions, when I try to open an existing file (not just one particular file), the file doesn't fully load. It shows some of the frame outlines and the graphic "content grab
-
Slow code insight in JDev 9.0.3.1035
Hello, sometimes when I invoke code insight in my Jdev it needs up to 30 secs to display. In this time JDeveloper is completely blocked and does not react to any keyboard or mouse input. It doesn't matter if the library is on a network drive or on th
-
Kindle Fire HD / Flash player ????
I have the brand new Kindle Fire HD...I went to watch a video...it said I needed to download flash player. Here's what I've done so far: 1) tried to download - No luck 2) checked for "settings" to enable flash - no "flash" listed 3) changed setting
-
Mountain Lion has real trouble!!
Having all kinds of trouble with Mountain Lion: 1. It tries to log me out when it goes to sleep - causing all sorts of issues with growl, time machine, and mail losing it's account settings temporarily - it is mail that doesn't allow the logout, but