Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Waimea Wilbur #1
Display integers in CFChart
:| The Yaxis which is passed an integer is displaying decimal numbers. How do
I disable the decimal numbers in CFChart ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!-- Get the raw data FROM [pm_metricsFY04]he database. -->
<!--- <cfquery name="qMetrics" datasource="pm_metrics">
SELECT Choice AS FieldValue FROM Choice ORDER BY ID ASC
</cfquery> --->
<cfquery name="ChartMetrics" datasource="pm_metrics">
SELECT pm_metrics.Metrics AS FieldValue, Count(pm_metrics.Metrics) AS
FieldCount
FROM [pm_metrics]pm_metrics, [pm_metrics]choice
GROUP BY pm_metrics.Metrics
ORDER BY COUNT(pm_metrics.Metrics) DESC
</cfquery>
<cfset NumRecords1 = ChartMetrics.FieldCount>
<cfquery name="ChartReport" datasource="pm_metrics">
SELECT pm_metrics.Report AS FieldValue, Count(pm_metrics.Report) AS FieldCount
FROM [pm_metrics]pm_metrics
<!--- WHERE COUNT (pm_metrics.Report) GTE '0' --->
GROUP BY pm_metrics.Report
ORDER BY COUNT(pm_metrics.Report) DESC
</cfquery>
<cfset NumRecords2 = ChartReport.FieldCount>
<cfquery name="ChartRequests" datasource="pm_metrics">
SELECT pm_metrics.Requests AS FieldValue, Count(pm_metrics.Requests) AS
FieldCount
FROM [pm_metrics]pm_metrics
<!--- WHERE COUNT (pm_metrics.Requests) GTE '0' --->
GROUP BY pm_metrics.Requests
ORDER BY COUNT(pm_metrics.Requests) DESC
</cfquery>
<cfset NumRecords3 = ChartRequests.FieldCount>
<cfquery name="ChartEnvironment" datasource="pm_metrics">
SELECT pm_metrics.Environment AS FieldValue, Count(pm_metrics.Environment) AS
FieldCount
FROM [pm_metrics]pm_metrics
<!--- WHERE COUNT (pm_metrics.Environment) GTE '0' --->
GROUP BY pm_metrics.Environment
ORDER BY COUNT(pm_metrics.Environment) DESC
</cfquery>
<cfset NumRecords4 = ChartEnvironment.FieldCount>
<cfquery name="ChartResponse" datasource="pm_metrics">
SELECT pm_metrics.Response AS FieldValue, Count(pm_metrics.Response) AS
FieldCount
FROM [pm_metrics]pm_metrics
<!--- WHERE COUNT (pm_metrics.Response) GTE '0' --->
GROUP BY pm_metrics.Response
ORDER BY COUNT(pm_metrics.Response) DESC
</cfquery>
<cfset NumRecords5 = ChartResponse.FieldCount>
<!--- <cfdump var="#NumRecords1#">
<cfdump var="#NumRecords2#">
<cfdump var="#NumRecords3#">
<cfdump var="#NumRecords4#">
<cfdump var="#NumRecords5#"> --->
<cfchart
format="flash"
chartheight="350"
chartwidth="540"
scalefrom="0"
scaleto="20"
gridlines="20"
seriesplacement="default"
font="Arial"
showborder="yes"
labelformat="number"
yaxistitle="Number of Replies"
tipstyle="mouseOver">
<cfchartseries
type="bar"
query="ChartMetrics"
itemcolumn="FieldValue"
valuecolumn="FieldCount"
serieslabel="Metrics reported clearly reflect current operational
status"
seriescolor="Olive"
paintstyle="shade">
<cfchartdata item="Strongly Agree" value="#NumRecords1#">
<cfchartdata item="Agree" value="#NumRecords1#">
<cfchartdata item="Neither Agree or Disagree" value="#NumRecords1#">
<cfchartdata item="Disagree" value="#NumRecords1#">
<cfchartdata item="Strongly Disagree" value="#NumRecords1#">
</cfchartseries>
<cfchartseries
type="bar"
query="ChartReport"
itemcolumn="FieldValue"
valuecolumn="FieldCount"
serieslabel="DRD reports are concise, informative, and submitted
on time"
seriescolor="green"
paintstyle="shade">
<cfchartdata item="Strongly Agree" value="#NumRecords2#">
<cfchartdata item="Agree" value="#NumRecords2#">
<cfchartdata item="Neither Agree or Disagree" value="#NumRecords2#">
<cfchartdata item="Disagree" value="#NumRecords2#">
<cfchartdata item="Strongly Disagree" value="#NumRecords2#">
</cfchartseries>
<cfchartseries
type="bar"
query="ChartRequests"
itemcolumn="FieldValue"
valuecolumn="FieldCount"
serieslabel="Move/modification requests have been implemented per
requirements"
seriescolor="Purple"
paintstyle="shade">
<cfchartdata item="Strongly Agree" value="#NumRecords3#">
<cfchartdata item="Agree" value="#NumRecords3#">
<cfchartdata item="Neither Agree or Disagree" value="#NumRecords3#">
<cfchartdata item="Disagree" value="#NumRecords3#">
<cfchartdata item="Strongly Disagree" value="#NumRecords3#">
</cfchartseries>
<cfchartseries
type="bar"
query="ChartEnvironment"
itemcolumn="FieldValue"
valuecolumn="FieldCount"
serieslabel="Site Facilities has provided a positive work
environment"
seriescolor="Blue"
paintstyle="shade">
<cfchartdata item="Strongly Agree" value="#NumRecords4#">
<cfchartdata item="Agree" value="#NumRecords4#">
<cfchartdata item="Neither Agree or Disagree" value="#NumRecords4#">
<cfchartdata item="Disagree" value="#NumRecords4#">
<cfchartdata item="Strongly Disagree" value="#NumRecords4#">
</cfchartseries>
<cfchartseries
type="bar"
query="ChartResponse"
itemcolumn="FieldValue"
valuecolumn="FieldCount"
serieslabel="Site Facilities has responded to your needs quickly
and professionally"
seriescolor="Maroon"
paintstyle="shade">
<cfchartdata item="Strongly Agree" value="#NumRecords5#">
<cfchartdata item="Agree" value="#NumRecords5#">
<cfchartdata item="Neither Agree or Disagree" value="#NumRecords5#">
<cfchartdata item="Disagree" value="#NumRecords5#">
<cfchartdata item="Strongly Disagree" value="#NumRecords5#">
</cfchartseries>
</cfchart>
<body>
</body>
</html>
Waimea Wilbur Guest
-
#38041 [Opn->Bgs]: PHP should support 64 bit long integers
ID: 38041 Updated by: tony2001@php.net Reported By: shailesh_bavadekar at yahoo dot com -Status: Open +Status: Bogus Bug... -
Converting integers to datetime
I have the following fields in a database: year integer(4) not null default '0' month integer(2) not null default '0' day ... -
voidP() and variable = VOID with integers with a value of 0
note that voidp(whatever) is a function returning true (1) if 'whatever' is equivalent to VOID. when you do: put vZero = VOID the program... -
getting decimal places when dividing integers
You just have to cast the right numbers: declare @int int declare @div int set @int = 10 set @div = 3 select cast(@int/cast(@div as...



Reply With Quote

