Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced google dashboard charts with Chart.js (via composer) #4435

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@
/app/etc/modules/Cm_RedisSession.xml
/lib/Credis

# flow.js library
/js/lib/uploader
# ChartJs library
/js/lib/chartjs

# TinyMCE library
/js/lib/tinymce

# flow.js library
/js/lib/uploader

# Add development environment setup files and README
# https://github.com/OpenMage/magento-lts/pull/1012
/dev/openmage/docker-magento
Expand Down
7 changes: 6 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class Mage_Adminhtml_Block_Dashboard extends Mage_Adminhtml_Block_Template

/**
* Location of the "Enable Chart" config param
*
* @deprecated
* @see Mage_Adminhtml_Helper_Dashboard_Data::XML_PATH_ENABLE_CHARTS
*/
public const XML_PATH_ENABLE_CHARTS = 'admin/dashboard/enable_charts';

Expand Down Expand Up @@ -60,7 +63,9 @@ protected function _prepareLayout()
$this->getLayout()->createBlock('adminhtml/dashboard_searches_top'),
);

if (Mage::getStoreConfig(self::XML_PATH_ENABLE_CHARTS)) {
/** @var Mage_Adminhtml_Helper_Dashboard_Data $helper */
$helper = Mage::helper('adminhtml/dashboard_data');
if ($helper->isChartEnabled()) {
$block = $this->getLayout()->createBlock('adminhtml/dashboard_diagrams');
} else {
$block = $this->getLayout()->createBlock('adminhtml/template')
Expand Down
Loading
Loading