Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8b36485c
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
app/assets/javascripts/pages/projects/graphs/show/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() {
...
@@ -21,9 +21,9 @@ export const ContributorsGraph = (function() {
ContributorsGraph
.
prototype
.
MARGIN
=
{
ContributorsGraph
.
prototype
.
MARGIN
=
{
top
:
20
,
top
:
20
,
right
:
2
0
,
right
:
1
0
,
bottom
:
30
,
bottom
:
30
,
left
:
5
0
left
:
4
0
};
};
ContributorsGraph
.
prototype
.
x_domain
=
null
;
ContributorsGraph
.
prototype
.
x_domain
=
null
;
...
@@ -114,7 +114,7 @@ export const ContributorsMasterGraph = (function(superClass) {
...
@@ -114,7 +114,7 @@ export const ContributorsMasterGraph = (function(superClass) {
this
.
data
=
data1
;
this
.
data
=
data1
;
this
.
update_content
=
this
.
update_content
.
bind
(
this
);
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
.
height
=
200
;
this
.
x
=
null
;
this
.
x
=
null
;
this
.
y
=
null
;
this
.
y
=
null
;
...
@@ -155,7 +155,14 @@ export const ContributorsMasterGraph = (function(superClass) {
...
@@ -155,7 +155,14 @@ export const ContributorsMasterGraph = (function(superClass) {
};
};
ContributorsMasterGraph
.
prototype
.
create_svg
=
function
()
{
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
)
{
ContributorsMasterGraph
.
prototype
.
create_area
=
function
(
x
,
y
)
{
...
@@ -225,10 +232,10 @@ export const ContributorsAuthorGraph = (function(superClass) {
...
@@ -225,10 +232,10 @@ export const ContributorsAuthorGraph = (function(superClass) {
this
.
data
=
data1
;
this
.
data
=
data1
;
// Don't split graph size in half for mobile devices.
// Don't split graph size in half for mobile devices.
if
(
$
(
window
).
width
()
<
7
68
)
{
if
(
$
(
window
).
width
()
<
7
90
)
{
this
.
width
=
this
.
determine_width
(
$
(
'
.
stat-graph
'
).
width
(),
$parentElements
);
this
.
width
=
this
.
determine_width
(
$
(
'
.
js-graphs-show
'
).
width
(),
$parentElements
);
}
else
{
}
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
.
height
=
200
;
this
.
x
=
null
;
this
.
x
=
null
;
...
@@ -270,7 +277,14 @@ export const ContributorsAuthorGraph = (function(superClass) {
...
@@ -270,7 +277,14 @@ export const ContributorsAuthorGraph = (function(superClass) {
ContributorsAuthorGraph
.
prototype
.
create_svg
=
function
()
{
ContributorsAuthorGraph
.
prototype
.
create_svg
=
function
()
{
const
persons
=
document
.
querySelectorAll
(
'
.person
'
);
const
persons
=
document
.
querySelectorAll
(
'
.person
'
);
this
.
list_item
=
persons
[
persons
.
length
-
1
];
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
)
{
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