无法读取未定义的 属性 "from"
Cannot read property "from" of undefined
"You need show full error, where does it happen, etc."
Joomla 2.5.1 上有一个 .php 文件(视图),其中包含一段代码:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {packages: ['corechart']});
google.charts.setOnLoadCallback(function drawMachines() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Machine');
data.addColumn('number', 'Printed');
data.addRow(['LP-3000', 69174.8542]);
data.addRow(['MPS', 74595.0154]);
data.addRow(['MPS-2', 85626.7536]);
data.addRow(['Digicon', 650.1061]);
data.addRow(['Indigo-4500', 17630.4017]);
data.addRow(['KDO-508', 15414.495]);
data.addRow(['MP', 0.0237]);
var options = {
'title': 'For machines'
,'titleTextStyle': {fontSize: '12'}
,'legend': {position: 'none'}
,'enableInteractivity': false
};
var chart = new google.visualization.ColumnChart(document.getElementById('com_fp_infopanel_manufacture_machines'));
chart.draw(data, options);
});
</script>
<div class="com_fp_infopanel_manufacture">
<div id="com_fp_infopanel_manufacture_machines" class="com_fp_infopanel_manufacture_machines"></div>
<div class="clear"></div>
</div>
我收到一条错误消息:“无法从未定义的 属性 中读取”。
有没有人遇到过这样的错误?
也许有人可以建议是什么原因?
查看源码:
<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7 ie6" lang="ru"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="ru"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="ru"> <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="ru"> <!--<![endif]-->
<head>
<base href="http://infopanel.fleksoprint.ru/index.php" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="50; URL='index.php?option=com_fp_infopanel&view=sales&layout=0'; charset=utf-8" />
<meta name="generator" content="J!Blank Template by Joomla-book.ru" />
<title>Flexo Print</title>
<link href="/templates/jblank/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<link rel="stylesheet" href="/media/com_fp_infopanel/site/css/manufacture.css" type="text/css" />
<link rel="stylesheet" href="/templates/jblank/css/base.css?1346224085" type="text/css" media="all" />
<link rel="stylesheet" href="/templates/jblank/css/grid.css?1346224085" type="text/css" media="all" />
<link rel="stylesheet" href="/templates/jblank/css/_styles.css?1346224085" type="text/css" media="all" />
<link rel="stylesheet" href="/media/mod_fp_infopanel/css/shipping.css" type="text/css" />
<link rel="stylesheet" href="/media/mod_fp_infopanel/css/birthday.css" type="text/css" />
<script src="/templates/jblank/js/libs/jquery.min.js?v=1.7.1" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/modernizr.min.js?1346224085" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/jquery.tools.js?1346224085" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/jquery-ui.min.js?1346224085" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/jquery.mousewheel.min.js?1346224085" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/jquery.smoothdivscroll.min.js?1346224085" type="text/javascript"></script>
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/system/js/core.js" type="text/javascript"></script>
<script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
<script src="/media/mod_coolclock/assets/js/excanvas.js" type="text/javascript"></script>
<script src="/media/mod_coolclock/assets/js/coolclock.js" type="text/javascript"></script>
<script src="/media/mod_coolclock/assets/js/moreskins.js" type="text/javascript"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width" />
</head>
<body>
<div class="container">
<div class="grid_2 content">
<div class="module module-left module-header "><h3 class="module-header">Часы</h3><div class="module-content">
<script type="text/javascript">
$(document).ready(function() {
function mod_coolclock132_date_refresh()
{
var months = [];
months.push('Января');
months.push('Февраля');
months.push('Марта');
months.push('Апреля');
months.push('Мая');
months.push('Июня');
months.push('Июля');
months.push('Августа');
months.push('Сентября');
months.push('Октября');
months.push('Ноября');
months.push('Декабря');
var weekdays = [];
weekdays.push('Воскресенье');
weekdays.push('Понедельник');
weekdays.push('Вторник');
weekdays.push('Среда');
weekdays.push('Четверг');
weekdays.push('Пятница');
weekdays.push('Суббота');
var today = new Date();
var date = '<h4>' + weekdays[today.getDay()] + ', ' + today.getDate() + ' ' + months[today.getMonth()] + ' ' + today.getFullYear();
$('#mod_coolclock_date132').html(date);
}
window.setInterval(mod_coolclock132_date_refresh, 60000);
mod_coolclock132_date_refresh();
});
</script>
<div style="text-align: center; border-radius: 0 0 5px 5px; border-style: ridge; border-width: 3px;">
<div><canvas id="clock132" class="CoolClock:swissRail:68::+4"></canvas></div>
<div id="mod_coolclock_date132"></div>
</div></div></div><div class="module module-left module-header "><h3 class="module-header">Время прихода</h3><div class="module-content">
<script type="text/javascript">
$(document).ready(function () {
$("#mod_fp_infopanel_birthday_employees135").smoothDivScroll({
mousewheelScrolling: false,
manualContinuousScrolling: false,
hotSpotScrolling: false,
autoScrollingMode: "always",
autoScrollingDirection: "endlesslooptop"
});
});
</script>
<div id="mod_fp_infopanel_birthday_employees135" class="mod_fp_infopanel_birthday_employees">
<div class="scrollWrapper">
<div class="scrollableArea">
<!-- <p style="clear: both;"/>
<div style="background-color: #2F6309;width:32px;height:12px;margin-top:6px;margin-left:5px;"></div>
<div style="color: #FFFFFF;padding:4px;font-weight:bold;font-size:10px;text-align:center;position:relative;margin-top:-17px;margin-bottom:-2px;">Авг</div>
<div style="color: #2F6309;font-weight:bold;font-size:1.3em;width:42px;text-align:center;">18</div>
</div>-->
<p class="mod_fp_infopanel_birthday_employee">09:46:18 - Кудинов Сергей Борисович</p>
<p style="clear: both;"/>
<!-- <p style="clear: both;"/>
<div style="background-color: #2F6309;width:32px;height:12px;margin-top:6px;margin-left:5px;"></div>
<div style="color: #FFFFFF;padding:4px;font-weight:bold;font-size:10px;text-align:center;position:relative;margin-top:-17px;margin-bottom:-2px;">Авг</div>
<div style="color: #2F6309;font-weight:bold;font-size:1.3em;width:42px;text-align:center;">18</div>
</div>-->
<p class="mod_fp_infopanel_birthday_employee">09:36:04 - Логинов Роман Викторович</p>
<p style="clear: both;"/>
<!-- <p style="clear: both;"/>
<div style="background-color: #2F6309;width:32px;height:12px;margin-top:6px;margin-left:5px;"></div>
<div style="color: #FFFFFF;padding:4px;font-weight:bold;font-size:10px;text-align:center;position:relative;margin-top:-17px;margin-bottom:-2px;">Авг</div>
<div style="color: #2F6309;font-weight:bold;font-size:1.3em;width:42px;text-align:center;">18</div>
</div>-->
<p class="mod_fp_infopanel_birthday_employee">09:11:28 - Мазин Александр Петрович</p>
<p style="clear: both;"/>
<!-- <p style="clear: both;"/>
<div style="background-color: #2F6309;width:32px;height:12px;margin-top:6px;margin-left:5px;"></div>
<div style="color: #FFFFFF;padding:4px;font-weight:bold;font-size:10px;text-align:center;position:relative;margin-top:-17px;margin-bottom:-2px;">Авг</div>
<div style="color: #2F6309;font-weight:bold;font-size:1.3em;width:42px;text-align:center;">18</div>
</div>-->
<p class="mod_fp_infopanel_birthday_employee">09:05:50 - Семенова Дарья Витальевна</p>
<p style="clear: both;"/>
</div>
</div>
</div>
</div></div>
</div>
<div class="grid_8 content">
<div class="module module-middle module-header "><h3 class="module-header">Показатели компании</h3><div class="module-content"><script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
function dateInFuture(days)
{
var now = new Date();
now.setDate( now.getDate() + days );
return now;
}
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Машина');
data.addColumn('date', 'Загрузка');
data.addRows([['MPS', dateInFuture(5.3083425954183)]]);
data.addRows([['MPS-2', dateInFuture(10.435140861034)]]);
data.addRows([['LP-3000', dateInFuture(3.3856865581936)]]);
data.addRows([['Indigo-4500', dateInFuture(0.019926592893071)]]);
var options = {
title: 'Загрузка печатного оборудования',
titleTextStyle: { fontSize: '12'},
legend: {position: 'none'},
hAxis: {format: 'dd MMM', minValue: new Date()},
enableInteractivity: false
};
var chart = new google.visualization.BarChart(document.getElementById('mod_fp_infopanel_shipping_load136'));
chart.draw(data, options);
});
</script>
<div class="mod_fp_infopanel_shipping_container">
<div id="mod_fp_infopanel_shipping_kpi136" class="mod_fp_infopanel_shipping_kpi">
<dl class="mod_fp_infopanel_shipping_Bar">
<dt class="mod_fp_infopanel_shipping_BarLabel">ВП</dt>
<dd class="mod_fp_infopanel_shipping_BarScale">
<div class="mod_fp_infopanel_shipping_BarFilled" style="width: 40.243306389056%;">40.2%<strong> </strong></div>
<div class="mod_fp_infopanel_shipping_BarAnotation">101 164,83 EUR. / 251 383,00 EUR.</div>
</dd>
<dt class="mod_fp_infopanel_shipping_BarLabel">Отгрузка</dt>
<dd class="mod_fp_infopanel_shipping_BarScale">
<div class="mod_fp_infopanel_shipping_BarFilled" style="width: 40.930513139422%;">40.9%<strong> </strong></div>
<div class="mod_fp_infopanel_shipping_BarAnotation">250 437,85 EUR. / 611 861,00 EUR.</div>
</dd>
<dt class="mod_fp_infopanel_shipping_BarLabel">Произведено</dt>
<dd class="mod_fp_infopanel_shipping_BarScale">
<div class="mod_fp_infopanel_shipping_BarFilled" style="width: 42.998597671693%;">43.0%<strong> </strong></div>
<div class="mod_fp_infopanel_shipping_BarAnotation">263 091,65 EUR. / 611 861,00 EUR.</div>
</dd>
<dt class="mod_fp_infopanel_shipping_BarLabel">Склад</dt>
<dd class="mod_fp_infopanel_shipping_BarPanel">
<div class="mod_fp_infopanel_shipping_BarValueText">47 306,65 EUR.</div>
</dd>
</dl>
</div>
</div>
<div id="mod_fp_infopanel_shipping_load136" class="mod_fp_infopanel_shipping_load"></div>
<div class="clear"></div>
</div></div><div class="module module-middle module-header "><div class="module-content">
<div class="custom" >
<hr /></div>
</div></div>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {packages: ['corechart']});
// Разбивка по машинам
google.charts.setOnLoadCallback(function drawMachines() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Машина');
data.addColumn('number', 'Отпечатано');
data.addRow(['LP-3000', 69174.8542]);
data.addRow(['MPS', 74595.0154]);
data.addRow(['MPS-2', 85626.7536]);
data.addRow(['Digicon', 650.1061]);
data.addRow(['Indigo-4500', 17630.4017]);
data.addRow(['KDO-508', 15414.495]);
data.addRow(['МП', 0.0237]);
var options = {
'title': 'По машинам'
,'titleTextStyle': {fontSize: '12'}
,'legend': {position: 'none'}
,'enableInteractivity': false
};
var chart = new google.visualization.ColumnChart(document.getElementById('com_fp_infopanel_manufacture_machines'));
chart.draw(data, options);
});
// Разбивка по сменам
google.charts.setOnLoadCallback(function drawShifts() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Бригада');
data.addColumn('number', 'Отпечатано');
data.addRow(['Катайкин', 48949.1127]);
data.addRow(['Владимиров', 55795.0403]);
data.addRow(['Шурыгин', 56640.1172]);
data.addRow(['Ломакин', 68120.6211]);
data.addRow(['Кононенко', 4385.4825]);
data.addRow(['Спиридонов', 8308.4379]);
data.addRow(['Станчев', 5418.9761]);
data.addRow(['Галушкин', 8535.9824]);
data.addRow(['Голев', 2884.7224]);
data.addRow(['Салтыков', 3993.7902]);
data.addRow(['Контракт', 59.3432]);
var options = {
'title': 'По бригадам'
,'titleTextStyle': {fontSize: '12'}
,'legend': {position: 'none'}
,'enableInteractivity': false
};
var chart = new google.visualization.ColumnChart(document.getElementById('com_fp_infopanel_manufacture_shifts'));
chart.draw(data, options);
});
</script>
<div class="com_fp_infopanel_manufacture">
<div id="com_fp_infopanel_manufacture_machines" class="com_fp_infopanel_manufacture_machines"></div>
<div id="com_fp_infopanel_manufacture_shifts" class="com_fp_infopanel_manufacture_shifts"></div>
<div class="clear"></div>
</div>
</div>
<div class="grid_2 content">
</div>
<div class="clear"></div>
<div class="modules-bottom content grid_12">
<div class="module module-bottom module-grid grid_12 "><div class="module-content">
<div class="custom" >
<p><a href="https://clck.yandex.ru/redir/dtype=stred/pid=7/cid=1228/*https://yandex.ru/pogoda/38" target="_blank"><img src="https://info.weather.yandex.net/38/2_white.ru.png?domain=ru" border="0" alt="Яндекс.Погода" /><img src="https://clck.yandex.ru/click/dtype=stred/pid=7/cid=1227/*https://img.yandex.ru/i/pix.gif" border="0" alt="" width="1" height="1" /></a></p></div>
</div></div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
问题是这样解决的:
...
google.charts.load('44', ...
...
看:https://developers.google.com/chart/interactive/docs/release_notes#official-releases
"You need show full error, where does it happen, etc."
Joomla 2.5.1 上有一个 .php 文件(视图),其中包含一段代码:
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {packages: ['corechart']});
google.charts.setOnLoadCallback(function drawMachines() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Machine');
data.addColumn('number', 'Printed');
data.addRow(['LP-3000', 69174.8542]);
data.addRow(['MPS', 74595.0154]);
data.addRow(['MPS-2', 85626.7536]);
data.addRow(['Digicon', 650.1061]);
data.addRow(['Indigo-4500', 17630.4017]);
data.addRow(['KDO-508', 15414.495]);
data.addRow(['MP', 0.0237]);
var options = {
'title': 'For machines'
,'titleTextStyle': {fontSize: '12'}
,'legend': {position: 'none'}
,'enableInteractivity': false
};
var chart = new google.visualization.ColumnChart(document.getElementById('com_fp_infopanel_manufacture_machines'));
chart.draw(data, options);
});
</script>
<div class="com_fp_infopanel_manufacture">
<div id="com_fp_infopanel_manufacture_machines" class="com_fp_infopanel_manufacture_machines"></div>
<div class="clear"></div>
</div>
我收到一条错误消息:“无法从未定义的 属性 中读取”。
有没有人遇到过这样的错误? 也许有人可以建议是什么原因?
查看源码:
<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7 ie6" lang="ru"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="ru"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="ru"> <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="ru"> <!--<![endif]-->
<head>
<base href="http://infopanel.fleksoprint.ru/index.php" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="50; URL='index.php?option=com_fp_infopanel&view=sales&layout=0'; charset=utf-8" />
<meta name="generator" content="J!Blank Template by Joomla-book.ru" />
<title>Flexo Print</title>
<link href="/templates/jblank/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<link rel="stylesheet" href="/media/com_fp_infopanel/site/css/manufacture.css" type="text/css" />
<link rel="stylesheet" href="/templates/jblank/css/base.css?1346224085" type="text/css" media="all" />
<link rel="stylesheet" href="/templates/jblank/css/grid.css?1346224085" type="text/css" media="all" />
<link rel="stylesheet" href="/templates/jblank/css/_styles.css?1346224085" type="text/css" media="all" />
<link rel="stylesheet" href="/media/mod_fp_infopanel/css/shipping.css" type="text/css" />
<link rel="stylesheet" href="/media/mod_fp_infopanel/css/birthday.css" type="text/css" />
<script src="/templates/jblank/js/libs/jquery.min.js?v=1.7.1" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/modernizr.min.js?1346224085" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/jquery.tools.js?1346224085" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/jquery-ui.min.js?1346224085" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/jquery.mousewheel.min.js?1346224085" type="text/javascript"></script>
<script src="/templates/jblank/js/libs/jquery.smoothdivscroll.min.js?1346224085" type="text/javascript"></script>
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/system/js/core.js" type="text/javascript"></script>
<script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
<script src="/media/mod_coolclock/assets/js/excanvas.js" type="text/javascript"></script>
<script src="/media/mod_coolclock/assets/js/coolclock.js" type="text/javascript"></script>
<script src="/media/mod_coolclock/assets/js/moreskins.js" type="text/javascript"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width" />
</head>
<body>
<div class="container">
<div class="grid_2 content">
<div class="module module-left module-header "><h3 class="module-header">Часы</h3><div class="module-content">
<script type="text/javascript">
$(document).ready(function() {
function mod_coolclock132_date_refresh()
{
var months = [];
months.push('Января');
months.push('Февраля');
months.push('Марта');
months.push('Апреля');
months.push('Мая');
months.push('Июня');
months.push('Июля');
months.push('Августа');
months.push('Сентября');
months.push('Октября');
months.push('Ноября');
months.push('Декабря');
var weekdays = [];
weekdays.push('Воскресенье');
weekdays.push('Понедельник');
weekdays.push('Вторник');
weekdays.push('Среда');
weekdays.push('Четверг');
weekdays.push('Пятница');
weekdays.push('Суббота');
var today = new Date();
var date = '<h4>' + weekdays[today.getDay()] + ', ' + today.getDate() + ' ' + months[today.getMonth()] + ' ' + today.getFullYear();
$('#mod_coolclock_date132').html(date);
}
window.setInterval(mod_coolclock132_date_refresh, 60000);
mod_coolclock132_date_refresh();
});
</script>
<div style="text-align: center; border-radius: 0 0 5px 5px; border-style: ridge; border-width: 3px;">
<div><canvas id="clock132" class="CoolClock:swissRail:68::+4"></canvas></div>
<div id="mod_coolclock_date132"></div>
</div></div></div><div class="module module-left module-header "><h3 class="module-header">Время прихода</h3><div class="module-content">
<script type="text/javascript">
$(document).ready(function () {
$("#mod_fp_infopanel_birthday_employees135").smoothDivScroll({
mousewheelScrolling: false,
manualContinuousScrolling: false,
hotSpotScrolling: false,
autoScrollingMode: "always",
autoScrollingDirection: "endlesslooptop"
});
});
</script>
<div id="mod_fp_infopanel_birthday_employees135" class="mod_fp_infopanel_birthday_employees">
<div class="scrollWrapper">
<div class="scrollableArea">
<!-- <p style="clear: both;"/>
<div style="background-color: #2F6309;width:32px;height:12px;margin-top:6px;margin-left:5px;"></div>
<div style="color: #FFFFFF;padding:4px;font-weight:bold;font-size:10px;text-align:center;position:relative;margin-top:-17px;margin-bottom:-2px;">Авг</div>
<div style="color: #2F6309;font-weight:bold;font-size:1.3em;width:42px;text-align:center;">18</div>
</div>-->
<p class="mod_fp_infopanel_birthday_employee">09:46:18 - Кудинов Сергей Борисович</p>
<p style="clear: both;"/>
<!-- <p style="clear: both;"/>
<div style="background-color: #2F6309;width:32px;height:12px;margin-top:6px;margin-left:5px;"></div>
<div style="color: #FFFFFF;padding:4px;font-weight:bold;font-size:10px;text-align:center;position:relative;margin-top:-17px;margin-bottom:-2px;">Авг</div>
<div style="color: #2F6309;font-weight:bold;font-size:1.3em;width:42px;text-align:center;">18</div>
</div>-->
<p class="mod_fp_infopanel_birthday_employee">09:36:04 - Логинов Роман Викторович</p>
<p style="clear: both;"/>
<!-- <p style="clear: both;"/>
<div style="background-color: #2F6309;width:32px;height:12px;margin-top:6px;margin-left:5px;"></div>
<div style="color: #FFFFFF;padding:4px;font-weight:bold;font-size:10px;text-align:center;position:relative;margin-top:-17px;margin-bottom:-2px;">Авг</div>
<div style="color: #2F6309;font-weight:bold;font-size:1.3em;width:42px;text-align:center;">18</div>
</div>-->
<p class="mod_fp_infopanel_birthday_employee">09:11:28 - Мазин Александр Петрович</p>
<p style="clear: both;"/>
<!-- <p style="clear: both;"/>
<div style="background-color: #2F6309;width:32px;height:12px;margin-top:6px;margin-left:5px;"></div>
<div style="color: #FFFFFF;padding:4px;font-weight:bold;font-size:10px;text-align:center;position:relative;margin-top:-17px;margin-bottom:-2px;">Авг</div>
<div style="color: #2F6309;font-weight:bold;font-size:1.3em;width:42px;text-align:center;">18</div>
</div>-->
<p class="mod_fp_infopanel_birthday_employee">09:05:50 - Семенова Дарья Витальевна</p>
<p style="clear: both;"/>
</div>
</div>
</div>
</div></div>
</div>
<div class="grid_8 content">
<div class="module module-middle module-header "><h3 class="module-header">Показатели компании</h3><div class="module-content"><script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
function dateInFuture(days)
{
var now = new Date();
now.setDate( now.getDate() + days );
return now;
}
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Машина');
data.addColumn('date', 'Загрузка');
data.addRows([['MPS', dateInFuture(5.3083425954183)]]);
data.addRows([['MPS-2', dateInFuture(10.435140861034)]]);
data.addRows([['LP-3000', dateInFuture(3.3856865581936)]]);
data.addRows([['Indigo-4500', dateInFuture(0.019926592893071)]]);
var options = {
title: 'Загрузка печатного оборудования',
titleTextStyle: { fontSize: '12'},
legend: {position: 'none'},
hAxis: {format: 'dd MMM', minValue: new Date()},
enableInteractivity: false
};
var chart = new google.visualization.BarChart(document.getElementById('mod_fp_infopanel_shipping_load136'));
chart.draw(data, options);
});
</script>
<div class="mod_fp_infopanel_shipping_container">
<div id="mod_fp_infopanel_shipping_kpi136" class="mod_fp_infopanel_shipping_kpi">
<dl class="mod_fp_infopanel_shipping_Bar">
<dt class="mod_fp_infopanel_shipping_BarLabel">ВП</dt>
<dd class="mod_fp_infopanel_shipping_BarScale">
<div class="mod_fp_infopanel_shipping_BarFilled" style="width: 40.243306389056%;">40.2%<strong> </strong></div>
<div class="mod_fp_infopanel_shipping_BarAnotation">101 164,83 EUR. / 251 383,00 EUR.</div>
</dd>
<dt class="mod_fp_infopanel_shipping_BarLabel">Отгрузка</dt>
<dd class="mod_fp_infopanel_shipping_BarScale">
<div class="mod_fp_infopanel_shipping_BarFilled" style="width: 40.930513139422%;">40.9%<strong> </strong></div>
<div class="mod_fp_infopanel_shipping_BarAnotation">250 437,85 EUR. / 611 861,00 EUR.</div>
</dd>
<dt class="mod_fp_infopanel_shipping_BarLabel">Произведено</dt>
<dd class="mod_fp_infopanel_shipping_BarScale">
<div class="mod_fp_infopanel_shipping_BarFilled" style="width: 42.998597671693%;">43.0%<strong> </strong></div>
<div class="mod_fp_infopanel_shipping_BarAnotation">263 091,65 EUR. / 611 861,00 EUR.</div>
</dd>
<dt class="mod_fp_infopanel_shipping_BarLabel">Склад</dt>
<dd class="mod_fp_infopanel_shipping_BarPanel">
<div class="mod_fp_infopanel_shipping_BarValueText">47 306,65 EUR.</div>
</dd>
</dl>
</div>
</div>
<div id="mod_fp_infopanel_shipping_load136" class="mod_fp_infopanel_shipping_load"></div>
<div class="clear"></div>
</div></div><div class="module module-middle module-header "><div class="module-content">
<div class="custom" >
<hr /></div>
</div></div>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {packages: ['corechart']});
// Разбивка по машинам
google.charts.setOnLoadCallback(function drawMachines() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Машина');
data.addColumn('number', 'Отпечатано');
data.addRow(['LP-3000', 69174.8542]);
data.addRow(['MPS', 74595.0154]);
data.addRow(['MPS-2', 85626.7536]);
data.addRow(['Digicon', 650.1061]);
data.addRow(['Indigo-4500', 17630.4017]);
data.addRow(['KDO-508', 15414.495]);
data.addRow(['МП', 0.0237]);
var options = {
'title': 'По машинам'
,'titleTextStyle': {fontSize: '12'}
,'legend': {position: 'none'}
,'enableInteractivity': false
};
var chart = new google.visualization.ColumnChart(document.getElementById('com_fp_infopanel_manufacture_machines'));
chart.draw(data, options);
});
// Разбивка по сменам
google.charts.setOnLoadCallback(function drawShifts() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Бригада');
data.addColumn('number', 'Отпечатано');
data.addRow(['Катайкин', 48949.1127]);
data.addRow(['Владимиров', 55795.0403]);
data.addRow(['Шурыгин', 56640.1172]);
data.addRow(['Ломакин', 68120.6211]);
data.addRow(['Кононенко', 4385.4825]);
data.addRow(['Спиридонов', 8308.4379]);
data.addRow(['Станчев', 5418.9761]);
data.addRow(['Галушкин', 8535.9824]);
data.addRow(['Голев', 2884.7224]);
data.addRow(['Салтыков', 3993.7902]);
data.addRow(['Контракт', 59.3432]);
var options = {
'title': 'По бригадам'
,'titleTextStyle': {fontSize: '12'}
,'legend': {position: 'none'}
,'enableInteractivity': false
};
var chart = new google.visualization.ColumnChart(document.getElementById('com_fp_infopanel_manufacture_shifts'));
chart.draw(data, options);
});
</script>
<div class="com_fp_infopanel_manufacture">
<div id="com_fp_infopanel_manufacture_machines" class="com_fp_infopanel_manufacture_machines"></div>
<div id="com_fp_infopanel_manufacture_shifts" class="com_fp_infopanel_manufacture_shifts"></div>
<div class="clear"></div>
</div>
</div>
<div class="grid_2 content">
</div>
<div class="clear"></div>
<div class="modules-bottom content grid_12">
<div class="module module-bottom module-grid grid_12 "><div class="module-content">
<div class="custom" >
<p><a href="https://clck.yandex.ru/redir/dtype=stred/pid=7/cid=1228/*https://yandex.ru/pogoda/38" target="_blank"><img src="https://info.weather.yandex.net/38/2_white.ru.png?domain=ru" border="0" alt="Яндекс.Погода" /><img src="https://clck.yandex.ru/click/dtype=stred/pid=7/cid=1227/*https://img.yandex.ru/i/pix.gif" border="0" alt="" width="1" height="1" /></a></p></div>
</div></div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
问题是这样解决的:
...
google.charts.load('44', ...
...
看:https://developers.google.com/chart/interactive/docs/release_notes#official-releases