Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. <cfsaveContent variable="chartStyle">
  2. <cfoutput>
  3. <?xml version="1.0" encoding="UTF-8"?>
  4. <frameChart isMultiline="false" is3D="#is3D#">
  5. <frame outline="##666666"/>
  6. <yAxis scaleMin="0" scaleMax="100"/>
  7. <legend allowSpan="true" equalCols="false" placement="Right" isMultiline="true">
  8. <decoration style="None"/>
  9. </legend>
  10. <cfif ShowPyramidNums>
  11. <dataLabels style="value" placement="Inside" font="Arial-12-bold" >
  12.  
  13. </dataLabels>
  14. </cfif>
  15. <elements place="Stacked" shape="PyramidCut" shapeSize="100">
  16. <movie framesPerSecond="2"/>
  17. <cfset sPerfCtr = 0>
  18. <cfloop index="i" from="#q_PerformanceDetailsByTemp.RecordCount#" to="1" step="-1">
  19. <series index="#Evaluate(sPerfCtr)#">
  20. <paint color="###q_PerformanceDetailsByTemp.ChartColor[i]#"/>
  21. </series>
  22. <cfset sPerfCtr = sPerfCtr+1>
  23. </cfloop>
  24. </elements>
  25. <table>
  26. <decoration style="Shadow"/>
  27. </table>
  28. <background maxColor="white"/>
  29. <decoration foreColor="white" backColor="##90FFFF"/>
  30. <popup showOn="Disabled" isAntialiased="true"/>
  31. <paint palette="Transluent" paint="Plain" max="52"/>
  32. </frameChart>
  33. </cfoutput>
  34. </cfsaveContent>
  35. <cfsavecontent variable="chartModel">
  36. <cfoutput>
  37. <?xml version="1.0" encoding="UTF-8"?>
  38. <XML type="default">
  39. <COL>Fall</COL>
  40. <COL>Winter</COL>
  41. <COL>Spring</COL>
  42. <cfset over100FallFixed = false>
  43. <cfset over100WinterFixed = false>
  44. <cfset over100SpringFixed = false>
  45. <cfloop index="i" from="#ArrayLen(PerfStats)#" to="1" step="-1">
  46. <cfset rowVal = Evaluate((1/q_PerformanceDetailsByTemp.recordCount)*100)>
  47. <cfif isDefined("over100Alert")>
  48. <!--- This set of if statements is to modify value to show triangle correctly --->
  49. <!--- Without this modification, the total ia 100.1 which cuts off the top of the triangle --->
  50. <cfif right(PerfStats[i].FallPercentage, 1) GT 0 AND NOT over100FallFixed>
  51. <cfset PerfStats[i].FallPercentage = PerfStats[i].FallPercentage - .1>
  52. </cfif>
  53. <cfif right(PerfStats[i].WinterPercentage, 1) GT 0 AND NOT over100WinterFixed>
  54. <cfset PerfStats[i].WinterPercentage = PerfStats[i].WinterPercentage - .1>
  55. </cfif>
  56. <cfif right(PerfStats[i].SpringPercentage, 1) GT 0 AND NOT over100SpringFixed>
  57. <cfset PerfStats[i].SpringPercentage = PerfStats[i].SpringPercentage - .1>
  58. </cfif>
  59. <ROW col0="#PerfStats[i].FallPercentage#" col1="#PerfStats[i].WinterPercentage#" col2="#PerfStats[i].SpringPercentage#">% #PerfStats[i].Name#</ROW>
  60. <cfelse>
  61. <ROW col0="#round(PerfStats[i].FallPercentage)#" col1="#round(PerfStats[i].WinterPercentage)#" col2="#round(PerfStats[i].SpringPercentage)#">% #PerfStats[i].Name#</ROW>
  62. </cfif>
  63. </cfloop>
  64. </XML>
  65. </cfoutput>
  66. </cfsavecontent>
  67. <cfscript>
  68. ImageName = "TierTrans_" & CreateUUID() & ".png";
  69. oMyWebChart = createObject("Java","com.gp.api.jsp.MxServerComponent");
  70. oMyApp = getPageContext().getServletContext();
  71. oSvr = oMyWebChart.getDefaultInstance(oMyApp);
  72. oMyChart2 = oSvr.newImageSpec();
  73. if(NOT Session.PDFIng)
  74. {
  75. oMyChart2.width = 650;
  76. } else
  77. {
  78. oMyChart2.width = 550;
  79. }
  80. oMyChart2.height= 230;
  81. oMyChart2.type = "png";
  82. oMyChart2.style = "#chartStyle#";
  83. oMyChart2.model = "#chartModel#";
  84. </cfscript>
  85. <cfif NOT DirectoryExists(ImagesDir)>
  86. <CFDIRECTORY ACTION="CREATE" DIRECTORY="#ImagesDir#">
  87. </cfif>
  88.  
  89. <!--- Save image to a different location --->
  90. <cfset oSvr.saveBytesTo(oMyChart2,"#ImagesDir##ImageName#")>
  91.  
  92. <cfoutput><img src="Images/Reports/#ImageName#" border="0"/></cfoutput>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement