cfdeveloper
Programmer
The values displayed on the y-axis are are mix of float and int. The chart displays int values on the y-axis if I use only one cfchartseries tag. The code below calculates the value for the gridlines and scaleto attributes.
When I output this variable, the value returned is 88 and when I execute the below code I get the following on the y-axis:
6 ,18, 30, 42, 54, 66, 78
However, when I add 3 more chartseries tag to the above code, I get
27.7, 83, 138.4, 193.8, 249.1, 304.5
Can any mathematician help please
Regards
cfcoder
Code:
<cfset scTo=evaluate(ArrayMax(ListToArray(valuelist(qJobsLogged.JOBSCOUNT)))+1)>
6 ,18, 30, 42, 54, 66, 78
Code:
<cfchart show3d="yes" gridlines="#evaluate(scTo+1)#" yaxistype="scale"
labelformat="number" scalefrom="0" scaleto="#scTo#" format="jpg"
xAxisTitle="log date" yAxisTitle="jobs logged" chartheight="300" chartwidth="450" sortxaxis="no" showborder="yes"
showxgridlines="yes" showygridlines="yes" seriesplacement="stacked" font="Arial" fontsize="12" fontbold="yes">
<cfchartseries type="bar" serieslabel="Critical" query="qJobsLogged" itemcolumn="DTLOGGED" valuecolumn="JOBSCOUNT">
<cfif qJobsLogged.jobPriority eq 1>
<cfchartdata item="#qJobsLogged.DTLOGGED#" value="#qJobsLogged.JOBCOUNT#">
</cfif>
</cfchartseries>
</cfchart>
However, when I add 3 more chartseries tag to the above code, I get
27.7, 83, 138.4, 193.8, 249.1, 304.5
Code:
<cfset scTo=evaluate(ArrayMax(ListToArray(valuelist(qJobsLogged.JOBCOUNT)))+1)>
<cfchart show3d="yes" gridlines="#evaluate(scTo+1)#" yaxistype="scale"
labelformat="number" scalefrom="0" scaleto="#scTo#" format="jpg"
xAxisTitle="log date" yAxisTitle="jobs logged" chartheight="300" chartwidth="450" sortxaxis="no" showborder="yes"
showxgridlines="yes" showygridlines="yes" seriesplacement="stacked" font="Arial" fontsize="12" fontbold="yes">
<cfchartseries type="bar" serieslabel="Critical" query="qJobsLogged" itemcolumn="DTLOGGED" valuecolumn="JOBSCOUNT">
<cfif qJobsLogged.jobPriority eq 1>
<cfchartdata item="#qJobsLogged.DTLOGGED#" value="#qJobsLogged.JOBCOUNT#">
</cfif>
</cfchartseries>
<cfchartseries type="bar" serieslabel="Urgent" query="qJobsLogged" itemcolumn="DTLOGGED" valuecolumn="JOBCOUNT">
<cfif qJobsLogged.jobPriority eq 2>
<cfchartdata item="#qJobsLogged.DTLOGGED#" value="#qJobsLogged.JOBCOUNT#">
</cfif>
</cfchartseries>
<cfchartseries type="bar" serieslabel="Normal" query="qJobsLogged" itemcolumn="DTLOGGED" valuecolumn="JOBCOUNT">
<cfif qJobsLogged.jobPriority eq 3>
<cfchartdata item="#qJobsLogged.DTLOGGED#" value="#qJobsLogged.JOBCOUNT#">
</cfif>
</cfchartseries>
<cfchartseries type="bar" serieslabel="Other" query="qJobsLogged" itemcolumn="DTLOGGED" valuecolumn="JOBCOUNT">
<cfif qJobsLogged.jobPriority gt 3>
<cfchartdata item="#qJobsLogged.DTLOGGED#" value="#qJobsLogged.JOBCOUNT#">
</cfif>
</cfchartseries>
</cfchart>
Can any mathematician help please
Regards
cfcoder