singlemonthlyprogressblock.html.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <?php
  2. /**
  3. * The singleproductmonthlyprogressblock block view file of block module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Mengyi Liu <liumengyi@easycorp.ltd>
  7. * @package block
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. blockPanel
  12. (
  13. to::titleSuffix
  14. (
  15. icon
  16. (
  17. setClass('text-light text-sm cursor-pointer'),
  18. toggle::tooltip
  19. (
  20. array
  21. (
  22. 'title' => sprintf($lang->block->tooltips['metricTime'], $metricTime),
  23. 'placement' => 'bottom',
  24. 'type' => 'white',
  25. 'className' => 'text-dark border border-light leading-5'
  26. )
  27. ),
  28. 'help'
  29. )
  30. ),
  31. div
  32. (
  33. setClass('flex h-full w-full' . ($longBlock ? ' flex-nowrap' : ' flex-wrap')),
  34. cell
  35. (
  36. setClass('chart line-chart ' . ($longBlock ? 'py-2' : 'py-1 w-full')),
  37. set::width($longBlock ? '1/4' : '100%'),
  38. echarts
  39. (
  40. set::title(array('text' => $lang->block->monthlyprogress->doneStoryEstimateTrendChart, 'textStyle' => array('fontSize' => '12'))),
  41. set::color(array('#2B80FF', '#17CE97')),
  42. set::width('100%'),
  43. set::height(200),
  44. set::grid(array('left' => '10px', 'top' => '60px', 'right' => '0', 'bottom' => '0', 'containLabel' => true)),
  45. set::xAxis(array('type' => 'category', 'data' => array_keys($doneStoryEstimate), 'splitLine' => array('show' => false), 'axisTick' => array('alignWithLabel' => true, 'interval' => 0), 'axisLabel' => array('fontSize' => $longBlock ? '8' : '10'))),
  46. set::yAxis(array('type' => 'value', 'name' => "({$config->block->storyUnitList[$config->custom->hourPoint]})", 'splitLine' => array('show' => false), 'axisLine' => array('show' => true, 'color' => '#DDD'), 'axisLabel' => array('showMaxLabel' => true, 'interval' => 'auto'))),
  47. set::series
  48. (
  49. array
  50. (
  51. 'type' => 'line',
  52. 'data' => array_values($doneStoryEstimate),
  53. 'emphasis' => array('label' => array('show' => true))
  54. )
  55. )
  56. )
  57. ),
  58. cell
  59. (
  60. setClass('chart line-chart ' . ($longBlock ? 'py-2' : 'py-1 w-full')),
  61. set::width($longBlock ? '1/4' : '100%'),
  62. echarts
  63. (
  64. set::title(array('text' => $lang->block->monthlyprogress->storyTrendChart, 'textStyle' => array('fontSize' => '12'))),
  65. set::color(array('#2B80FF', '#17CE97')),
  66. set::width('100%'),
  67. set::height(200),
  68. set::grid(array('left' => '10px', 'top' => '60px', 'right' => '0', 'bottom' => '0', 'containLabel' => true)),
  69. set::legend(array('show' => true, 'right' => '0', 'top' => '25px', 'textStyle' => array('fontSize' => '11'))),
  70. set::xAxis(array('type' => 'category', 'data' => array_keys($createStoryCount), 'splitLine' => array('show' => false), 'axisTick' => array('alignWithLabel' => true, 'interval' => 0), 'axisLabel' => array('fontSize' => $longBlock ? '8' : '10'))),
  71. set::yAxis(array('type' => 'value', 'name' => "({$lang->block->projectstatistic->unit})", 'splitLine' => array('show' => false), 'axisLine' => array('show' => true, 'color' => '#DDD'), 'axisLabel' => array('showMaxLabel' => true, 'interval' => 'auto'))),
  72. set::series
  73. (
  74. array
  75. (
  76. array
  77. (
  78. 'type' => 'line',
  79. 'name' => $lang->block->productstatistic->opened,
  80. 'data' => array_values($createStoryCount),
  81. 'emphasis' => array('label' => array('show' => true))
  82. ),
  83. array
  84. (
  85. 'type' => 'line',
  86. 'name' => $lang->block->productstatistic->done,
  87. 'data' => array_values($doneStoryCount),
  88. 'emphasis' => array('label' => array('show' => true))
  89. )
  90. )
  91. )
  92. )
  93. ),
  94. cell
  95. (
  96. setClass('chart line-chart ' . ($longBlock ? 'py-2' : 'py-1 w-full')),
  97. set::width($longBlock ? '1/4' : '100%'),
  98. echarts
  99. (
  100. set::title(array('text' => $lang->block->monthlyprogress->bugTrendChart, 'textStyle' => array('fontSize' => '12'))),
  101. set::color(array('#2B80FF', '#17CE97')),
  102. set::width('100%'),
  103. set::height(200),
  104. set::grid(array('left' => '10px', 'top' => '60px', 'right' => '0', 'bottom' => '0', 'containLabel' => true)),
  105. set::legend(array('show' => true, 'right' => '0', 'top' => '25px', 'textStyle' => array('fontSize' => '11'))),
  106. set::xAxis(array('type' => 'category', 'data' => array_keys($createBugCount), 'splitLine' => array('show' => false), 'axisTick' => array('alignWithLabel' => true, 'interval' => 0), 'axisLabel' => array('fontSize' => $longBlock ? '8' : '10'))),
  107. set::yAxis(array('type' => 'value', 'name' => "({$lang->block->projectstatistic->unit})", 'splitLine' => array('show' => false), 'axisLine' => array('show' => true, 'color' => '#DDD'), 'axisLabel' => array('showMaxLabel' => true, 'interval' => 'auto'))),
  108. set::series
  109. (
  110. array
  111. (
  112. array
  113. (
  114. 'type' => 'line',
  115. 'name' => $lang->block->productstatistic->opened,
  116. 'data' => array_values($createBugCount),
  117. 'emphasis' => array('label' => array('show' => true))
  118. ),
  119. array
  120. (
  121. 'type' => 'line',
  122. 'name' => $lang->bug->resolve,
  123. 'data' => array_values($fixedBugCount),
  124. 'emphasis' => array('label' => array('show' => true))
  125. )
  126. )
  127. )
  128. )
  129. ),
  130. cell
  131. (
  132. setClass('chart line-chart ' . ($longBlock ? 'py-2' : 'py-1 w-full')),
  133. set::width($longBlock ? '1/4' : '100%'),
  134. echarts
  135. (
  136. set::title(array('text' => $lang->block->releasestatistic->monthly, 'textStyle' => array('fontSize' => '12'))),
  137. set::color(array('#2B80FF')),
  138. set::width('100%'),
  139. set::height(200),
  140. set::grid(array('left' => '10px', 'top' => '60px', 'right' => '0', 'bottom' => '0', 'containLabel' => true)),
  141. set::xAxis(array('type' => 'category', 'data' => array_keys($releaseCount), 'splitLine' => array('show' => false), 'axisTick' => array('alignWithLabel' => true, 'interval' => 0), 'axisLabel' => array('fontSize' => $longBlock ? '8' : '10'))),
  142. set::yAxis(array('type' => 'value', 'name' => "({$lang->block->projectstatistic->unit})", 'splitLine' => array('show' => false), 'axisLine' => array('show' => true, 'color' => '#DDD'), 'axisLabel' => array('showMaxLabel' => true, 'interval' => 'auto'))),
  143. set::series
  144. (
  145. array
  146. (
  147. array
  148. (
  149. 'type' => 'line',
  150. 'name' => $lang->product->releases,
  151. 'data' => array_values($releaseCount),
  152. 'emphasis' => array('label' => array('show' => true))
  153. )
  154. )
  155. )
  156. )
  157. )
  158. )
  159. );
  160. render();