Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. //************************************************************************************
  2. // SQL
  3. //************************************************************************************
  4.  
  5. select rvc.NAME, count(*)
  6. from DOCS d, RVC rvc
  7. WHERE d.RVC=rvc.RVC_ID and trunc(d.BUSSINES_DATE) = trunc(SYSDATE) and d.RVC!=0 and d.COFIRMATION='T' and d.CHECK_OPEN='F'
  8. GROUP BY rvc.NAME
  9. ORDER BY rvc.NAME
  10.  
  11.  
  12. //************************************************************************************
  13. // JS
  14. //************************************************************************************
  15.  
  16. $(function () {
  17.  
  18. var CHART_TITLE = 'Checks by RVC';
  19. var CHART_DATA = '';
  20. var CHART_SUBTITLE = '';
  21. var YAXIS_TITLE = 'pcs';
  22.  
  23. var series = [];
  24.  
  25. // extract data
  26. data.forEach(function(item, i, arr) {
  27. var rvc = item[0],
  28. val = item[1];
  29.  
  30. series.push({
  31. name: rvc,
  32. data: [val]
  33. });
  34.  
  35. });
  36.  
  37.  
  38.  
  39.  
  40. $('#container').highcharts({
  41. chart: {
  42. type: 'column'
  43. },
  44. title: {
  45. text: CHART_TITLE
  46. },
  47. subtitle: {
  48. text: CHART_SUBTITLE
  49. },
  50.  
  51. xAxis: {
  52. // categories: categories,
  53. categories: [
  54. CHART_DATA
  55. ],
  56. stackLabels: {
  57. enabled: true,
  58. style: {
  59. fontWeight: 'bold',
  60. color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
  61. }
  62. }
  63. },
  64. yAxis: {
  65. min: 0,
  66. tickInterval: 1,
  67. title: {
  68. text: YAXIS_TITLE
  69. },
  70. },
  71. legend: {
  72. align: 'center',
  73. verticalAlign: 'bottom',
  74. // floating: true,
  75. backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
  76. },
  77. tooltip: {
  78. headerFormat: '<b>{point.x}</b><br/>',
  79. pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
  80. },
  81. plotOptions: {
  82. column: {
  83. dataLabels: {
  84. enabled: false,
  85. }
  86. }
  87. },
  88.  
  89. series: series
  90. });
  91.  
  92.  
  93. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement