Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. public with sharing class TypeControllerNew2 {
  2.  
  3. public class CaseCharges {
  4.  
  5. public Integer count {get; set;}
  6. public String typ {get; set; }
  7. CaseCharges(String typ, Integer count) {
  8. this.count = count;
  9. this.typ = typ;
  10. }
  11.  
  12. <apex:page docType="html-5.0" showHeader="false" sidebar="false" cache="false" controller="TypeControllerNew2" standardStylesheets="false" >
  13.  
  14. <body>
  15.  
  16. <outputPanel style="padding: 15px;">
  17. <a href="/apex/CaseList?fcf=00B21000000UI5I" class="alert-link">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Estimate of Non-Primary Charges</a>
  18.  
  19. <apex:chart height="380" width="400" data="{!CaseCharges}">
  20. <apex:legend position="right"/>
  21. <apex:axis type="Numeric" position="bottom" fields="count" title="Case Record Count" minimum="0" maximum="10" />
  22. <apex:axis type="Category" position="left" fields="typ" title="Case Type" />
  23. <apex:barSeries title="In Progress Cases" orientation="horizontal" gutter="10" axis="bottom" xField="count" yField="typ" colorsProgressWithinSeries="true" colorset="red, green, yellow, black, white, orange" >
  24. <apex:chartTips height="20" width="120" />
  25. </apex:barSeries>
  26. </apex:chart>
  27. <apex:dataTable value="{!CaseCharges}" var="ty">
  28. <apex:column headerValue="Case Type" value="{!ty.typ}"/>
  29. <apex:column headerValue="Number of Cases" value="{!ty.count}"/>
  30. </apex:dataTable>
  31. </outputPanel>
  32. </body>
  33.  
  34. @isTest (seeAllData = true)
  35.  
  36. PageReference graph2Page = Page.AWSHome;
  37. Test.setCurrentPage(graph2Page);
  38.  
  39. TypeControllerNew2 tcNew2Test = new TypeControllerNew2();
  40. tcNew2Test.getCaseCharges();
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement