graph.phtml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. // @codingStandardsIgnoreFile
  7. ?>
  8. <div class="dashboard-diagram">
  9. <div class="dashboard-diagram-switcher">
  10. <label for="order_<?= $block->getHtmlId() ?>_period"
  11. class="label"><?= /* @escapeNotVerified */ __('Select Range:') ?></label>
  12. <select name="period" id="order_<?= $block->getHtmlId() ?>_period"
  13. onchange="changeDiagramsPeriod(this);" class="admin__control-select">
  14. <?php foreach ($this->helper('Magento\Backend\Helper\Dashboard\Data')->getDatePeriods() as $value => $label): ?>
  15. <?php if (in_array($value, ['custom'])) {
  16. continue;
  17. } ?>
  18. <option value="<?= /* @escapeNotVerified */ $value ?>"
  19. <?php if ($block->getRequest()->getParam('period') == $value): ?> selected="selected"<?php endif; ?>
  20. ><?= /* @escapeNotVerified */ $label ?></option>
  21. <?php endforeach; ?>
  22. </select>
  23. </div>
  24. <?php if ($block->getCount()): ?>
  25. <div class="dashboard-diagram-image">
  26. <img src="<?= /* @escapeNotVerified */ $block->getChartUrl(false) ?>" class="dashboard-diagram-chart" alt="Chart" title="Chart" />
  27. </div>
  28. <?php else: ?>
  29. <div class="dashboard-diagram-nodata">
  30. <span><?= /* @escapeNotVerified */ __('No Data Found') ?></span>
  31. </div>
  32. <?php endif; ?>
  33. </div>