Серия графиков, правки в табл.

parent 82178927
......@@ -136,3 +136,9 @@
text-align: center;
}
.b-table_wrapp
{
display: none;
margin-top: 30px;
}
......@@ -90,6 +90,7 @@ $(document).ready(function(){
ChartStat: {
DateStat: function(dataLineChartStat) {
var activeLines = ['shows', 'clicks', 'transactions', 'salemoney', 'admoney'];
activeLine = 'shows';
activeDays = 'day';
console.log('AAA DateStat: ', dataLineChartStat);
......@@ -116,10 +117,19 @@ $(document).ready(function(){
axes = {};
// Определяем названия в легенде:
/*
dataColumnsTemp.push(['data'].concat(dataValue));
names['data'] = activeLine;
types['data'] = 'area-spline';
axes['data'] = 'y';
*/
for (var i = 1; i <= activeLines.length; i++) {
dataColumnsTemp.push(['data'+i].concat(dataLineChartStat[activeLines[i-1]]));
names['data'+i] = activeLines[i-1],
types['data'+i] = 'area-spline';
axes['data'+i] = 'y';
}
console.log('AAA dataColumnsTemp ', dataColumnsTemp);
......@@ -165,7 +175,7 @@ $(document).ready(function(){
value: valueFormat
}
},
legend: {show: false},
legend: {show: true},
});
// Подсвечиваем Определяем индексы воскресенья:
......
......@@ -2,19 +2,11 @@ $(document).ready(function(){
var
$table = $('#table-line'),
$tableHeader = $('<thead>'),
$tableContent = $('<tbody>'),
$tableBody = $table.find('tbody').first(),
activeLinesSwitchSelector = '.b-filter__switch.current-metric:not(.metric-data) .b-filter__switch-item',
$activeLinesSwitch = $(activeLinesSwitchSelector),
selectorTableTimeSwitch = '.b-filter__switch.time-table .m-filter__switch-item_active',
selectorActiveData = '.b-filter__switch.metric-data .m-filter__switch-item_active',
timeTableType,
activeLines = [],
currentActiveLine,
metric,
dataTable,
bySiteState = false;
dataTable;
function valueFormat(value)
{
......@@ -83,10 +75,6 @@ $(document).ready(function(){
dataTable[item] = [];
});
$table.removeClass('compare');
$('thead', $table).removeClass('sortable');
if (dataLineChartStat.type == 'interval') {
RenderInterval(dataLineChartStat);
}
......@@ -108,14 +96,7 @@ $(document).ready(function(){
})
return (listSites.length == 0) ? false : listSites;
},
// Устанавливаем состояние "по сайту" (при клике на сайт в таблице)
SetSiteState: function(state) {
bySiteState = state;
},
// Получаем состояние "по сайту"
GetSiteState: function() {
return bySiteState;
},
}
});
......
......@@ -28,7 +28,7 @@ $(document).ready(function(){
var
$chartStat = $('#chart-graph-stat'),
$chartTable = $('#b-content__traffic-table'),
$chartTable = $('#table-stat'),
$chartStatInfo = $('.chart-graph-stat-info'),
$chartStatError = $('.chart-graph-stat-error'),
$chartStatLoading = $('.chart-graph-stat-loading'),
......
......@@ -133,16 +133,15 @@ $dates = $this->dates;
<div class="message"></div>
</div>
<?php /* График */ ?>
<div id="chart-graph-stat" style="height: 370px;"></div>
<div class="chart-graph-stat-loading"></div>
<?php /* Таблица */ ?>
<section id="b-content__traffic-table" class="b-content__traffic metrics" style="display: none;">
<div id="table-stat" class="b-table_wrapp">
<div class="b-content__loading"></div>
<div class="wrapp">
<table id="table-line" class="table table-striped admin">
<thead class="metric">
<thead class="metric sortable">
<tr data-metric="<?= $metric ?>" <?= $current_style ?>>
<th><?= _t('Дата/Компания')?></th>
<?php foreach(['shows', 'clicks', 'transactions', 'salemoney', 'admoney'] as $name): ?>
......@@ -160,7 +159,6 @@ $dates = $this->dates;
</tbody>
</table>
</div>
</section>
</div>
</section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment