BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8b36485c
Unverified
Commit
8b36485c
authored
May 15, 2018
by
Paul Vorbach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use correct base width
parent
e9fcaed3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
stat_graph_contributors_graph.js
...ges/projects/graphs/show/stat_graph_contributors_graph.js
+22
-8
No files found.
app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors_graph.js
View file @
8b36485c
...
...
@@ -21,9 +21,9 @@ export const ContributorsGraph = (function() {
ContributorsGraph
.
prototype
.
MARGIN
=
{
top
:
20
,
right
:
2
0
,
right
:
1
0
,
bottom
:
30
,
left
:
5
0
left
:
4
0
};
ContributorsGraph
.
prototype
.
x_domain
=
null
;
...
...
@@ -114,7 +114,7 @@ export const ContributorsMasterGraph = (function(superClass) {
this
.
data
=
data1
;
this
.
update_content
=
this
.
update_content
.
bind
(
this
);
this
.
width
=
this
.
determine_width
(
$
(
'.
stat-graph
'
).
width
(),
$parentElement
);
this
.
width
=
this
.
determine_width
(
$
(
'.
js-graphs-show
'
).
width
(),
$parentElement
);
this
.
height
=
200
;
this
.
x
=
null
;
this
.
y
=
null
;
...
...
@@ -155,7 +155,14 @@ export const ContributorsMasterGraph = (function(superClass) {
};
ContributorsMasterGraph
.
prototype
.
create_svg
=
function
()
{
return
this
.
svg
=
d3
.
select
(
"#contributors-master"
).
append
(
"svg"
).
attr
(
"width"
,
this
.
width
+
this
.
MARGIN
.
left
+
this
.
MARGIN
.
right
).
attr
(
"height"
,
this
.
height
+
this
.
MARGIN
.
top
+
this
.
MARGIN
.
bottom
).
attr
(
"class"
,
"tint-box"
).
append
(
"g"
).
attr
(
"transform"
,
"translate("
+
this
.
MARGIN
.
left
+
","
+
this
.
MARGIN
.
top
+
")"
);
this
.
svg
=
d3
.
select
(
"#contributors-master"
)
.
append
(
"svg"
)
.
attr
(
"width"
,
this
.
width
+
this
.
MARGIN
.
left
+
this
.
MARGIN
.
right
)
.
attr
(
"height"
,
this
.
height
+
this
.
MARGIN
.
top
+
this
.
MARGIN
.
bottom
)
.
attr
(
"class"
,
"tint-box"
)
.
append
(
"g"
)
.
attr
(
"transform"
,
"translate("
+
this
.
MARGIN
.
left
+
","
+
this
.
MARGIN
.
top
+
")"
);
return
this
.
svg
;
};
ContributorsMasterGraph
.
prototype
.
create_area
=
function
(
x
,
y
)
{
...
...
@@ -225,10 +232,10 @@ export const ContributorsAuthorGraph = (function(superClass) {
this
.
data
=
data1
;
// Don't split graph size in half for mobile devices.
if
(
$
(
window
).
width
()
<
7
68
)
{
this
.
width
=
this
.
determine_width
(
$
(
'.
stat-graph
'
).
width
(),
$parentElements
);
if
(
$
(
window
).
width
()
<
7
90
)
{
this
.
width
=
this
.
determine_width
(
$
(
'.
js-graphs-show
'
).
width
(),
$parentElements
);
}
else
{
this
.
width
=
this
.
determine_width
(
$
(
'.
stat-graph
'
).
width
()
/
2
,
$parentElements
);
this
.
width
=
this
.
determine_width
(
$
(
'.
js-graphs-show
'
).
width
()
/
2
,
$parentElements
);
}
this
.
height
=
200
;
this
.
x
=
null
;
...
...
@@ -270,7 +277,14 @@ export const ContributorsAuthorGraph = (function(superClass) {
ContributorsAuthorGraph
.
prototype
.
create_svg
=
function
()
{
const
persons
=
document
.
querySelectorAll
(
'.person'
);
this
.
list_item
=
persons
[
persons
.
length
-
1
];
return
this
.
svg
=
d3
.
select
(
this
.
list_item
).
append
(
"svg"
).
attr
(
"width"
,
this
.
width
+
this
.
MARGIN
.
left
+
this
.
MARGIN
.
right
).
attr
(
"height"
,
this
.
height
+
this
.
MARGIN
.
top
+
this
.
MARGIN
.
bottom
).
attr
(
"class"
,
"spark"
).
append
(
"g"
).
attr
(
"transform"
,
"translate("
+
this
.
MARGIN
.
left
+
","
+
this
.
MARGIN
.
top
+
")"
);
this
.
svg
=
d3
.
select
(
this
.
list_item
)
.
append
(
"svg"
)
.
attr
(
"width"
,
this
.
width
+
this
.
MARGIN
.
left
+
this
.
MARGIN
.
right
)
.
attr
(
"height"
,
this
.
height
+
this
.
MARGIN
.
top
+
this
.
MARGIN
.
bottom
)
.
attr
(
"class"
,
"spark"
)
.
append
(
"g"
)
.
attr
(
"transform"
,
"translate("
+
this
.
MARGIN
.
left
+
","
+
this
.
MARGIN
.
top
+
")"
);
return
this
.
svg
;
};
ContributorsAuthorGraph
.
prototype
.
draw_path
=
function
(
data
)
{
...
...
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