waterfallprogressblock.html.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * The waterfall progress 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 Yuting Wang <wangyuting@easycorp.ltd>
  7. * @package block
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. blockPanel
  12. (
  13. div
  14. (
  15. setClass('pt-6'),
  16. echarts
  17. (
  18. set::color(array('#2B80FF', '#17CE97', '#FFAF65')),
  19. set::width('100%'),
  20. set::height(170),
  21. set::grid(array('left' => '10px', 'top' => '30px', 'right' => '0', 'bottom' => '0', 'containLabel' => true)),
  22. set::legend(array('show' => true, 'right' => '0')),
  23. set::xAxis(array('type' => 'category', 'data' => array_keys($charts['pv']), 'splitLine' => array('show' => false), 'axisTick' => array('alignWithLabel' => true, 'interval' => '0'))),
  24. set::yAxis(array('type' => 'value', 'name' => $lang->block->estimate->workhour, 'splitLine' => array('show' => false), 'axisLine' => array('show' => true, 'color' => '#DDD'))),
  25. set::series
  26. (
  27. array
  28. (
  29. array
  30. (
  31. 'type' => 'line',
  32. 'name' => 'PV',
  33. 'data' => array_values($charts['pv']),
  34. 'emphasis' => array('label' => array('show' => true))
  35. ),
  36. array
  37. (
  38. 'type' => 'line',
  39. 'name' => 'EV',
  40. 'data' => array_values($charts['ev']),
  41. 'emphasis' => array('label' => array('show' => true))
  42. ),
  43. array
  44. (
  45. 'type' => 'line',
  46. 'name' => 'AC',
  47. 'data' => array_values($charts['ac']),
  48. 'emphasis' => array('label' => array('show' => true))
  49. )
  50. )
  51. )
  52. )
  53. )
  54. );