Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
addcpm-json
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
addcpm-json
Commits
a4b88e44
Commit
a4b88e44
authored
Nov 15, 2018
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Логика checkbox-категории в табл. при переключении дата/компания
parent
8635c101
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
15 deletions
+10
-15
script-feeds-stat-charts.js
src/public/js/script-feeds-stat-charts.js
+8
-14
script-feeds-stat.js
src/public/js/script-feeds-stat.js
+2
-1
No files found.
src/public/js/script-feeds-stat-charts.js
View file @
a4b88e44
...
...
@@ -9,7 +9,6 @@ $(document).ready(function(){
activeLine
=
$
(
selectorActiveLine
).
data
(
'filter-category'
),
activeTime
,
activeDays
,
timeInterval
=
[],
toggelDates
=
[],
selectedCategoriesId
=
[],
weekDatesDataStart
,
...
...
@@ -21,12 +20,6 @@ $(document).ready(function(){
'admoney'
:
'#9467BD'
};
// Временные интервалы для отображения на оси:
for
(
var
i
=
0
;
i
<
24
;
i
++
)
{
timeInterval
.
push
(
pad
(
i
)
+
':00'
);
}
// Добавление впереди 0 у однозначных значений
function
pad
(
number
)
{
var
r
=
String
(
number
);
...
...
@@ -99,6 +92,8 @@ $(document).ready(function(){
}
var
chart
;
$
.
extend
({
ChartStat
:
{
DateStat
:
function
(
dataLineChartStat
)
{
...
...
@@ -139,12 +134,11 @@ $(document).ready(function(){
axes
[
'data'
+
i
]
=
'y'
;
colors
[
'data'
+
i
]
=
colorsActiveLines
[
currentActiveLine
];
}
}
//console.log('AAA dataColumnsTemp ', dataColumnsTemp);
var
chart
=
c3
.
generate
({
//var chart = c3.generate({
chart
=
c3
.
generate
({
bindto
:
selectorGraphChartStat
,
data
:
{
x
:
'x'
,
...
...
@@ -154,10 +148,6 @@ $(document).ready(function(){
types
:
types
,
axes
:
axes
,
colors
:
colors
,
/*
colors: {
data: '#2ca02c',
},*/
},
axis
:
{
x
:
{
...
...
@@ -211,6 +201,10 @@ $(document).ready(function(){
}
},
ToggleCats
:
function
(
toggelDates
)
{
chart
.
toggle
(
toggelDates
);
}
}
});
...
...
src/public/js/script-feeds-stat.js
View file @
a4b88e44
...
...
@@ -136,13 +136,14 @@ $(document).ready(function(){
if
(
$this
.
hasClass
(
'main-cat'
))
{
dataLineChartStat
=
(
$this
.
hasClass
(
'date'
))
?
periodStatsData
:
companyStatsData
;
$tableHeadColsChecks
.
attr
(
"disabled"
,
$this
.
hasClass
(
'company'
));
}
renderHourTable
();
});
// Клик на checkbox в названии поля таблицы:
var
$tableHeadColsChecks
=
$
(
'#table-line thead.metric.sortable th input[type="checkbox"]'
);
$tableHeadColsChecks
.
on
(
'change'
,
'thead.metric.sortable th input[type="checkbox"]'
,
function
(){
$tableHeadColsChecks
.
on
(
'change'
,
function
(){
renderLineChart
();
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment