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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
6579ba3e
Commit
6579ba3e
authored
Aug 14, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase graphs height
parent
ddaa1f1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
app/assets/javascripts/stat_graph_contributors_graph.js.coffee
...ssets/javascripts/stat_graph_contributors_graph.js.coffee
+11
-9
No files found.
app/assets/javascripts/stat_graph_contributors_graph.js.coffee
View file @
6579ba3e
class
window
.
ContributorsGraph
class
window
.
ContributorsGraph
MARGIN
:
MARGIN
:
top
:
20
top
:
20
right
:
20
right
:
20
bottom
:
30
bottom
:
30
left
:
50
left
:
50
x_domain
:
null
x_domain
:
null
y_domain
:
null
y_domain
:
null
...
@@ -38,7 +38,7 @@ class window.ContributorsGraph
...
@@ -38,7 +38,7 @@ class window.ContributorsGraph
@
y
=
d3
.
scale
.
linear
().
range
([
height
,
0
]).
nice
()
@
y
=
d3
.
scale
.
linear
().
range
([
height
,
0
]).
nice
()
draw_x_axis
:
->
draw_x_axis
:
->
@
svg
.
append
(
"g"
).
attr
(
"class"
,
"x axis"
).
attr
(
"transform"
,
"translate(0,
#{
@
height
}
)"
)
@
svg
.
append
(
"g"
).
attr
(
"class"
,
"x axis"
).
attr
(
"transform"
,
"translate(0,
#{
@
height
}
)"
)
.
call
(
@
x_axis
)
;
.
call
(
@
x_axis
)
draw_y_axis
:
->
draw_y_axis
:
->
@
svg
.
append
(
"g"
).
attr
(
"class"
,
"y axis"
).
call
(
@
y_axis
)
@
svg
.
append
(
"g"
).
attr
(
"class"
,
"y axis"
).
call
(
@
y_axis
)
set_data
:
(
data
)
->
set_data
:
(
data
)
->
...
@@ -51,7 +51,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph
...
@@ -51,7 +51,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph
else
else
@
width
=
870
@
width
=
870
@
height
=
125
@
height
=
200
@
x
=
null
@
x
=
null
@
y
=
null
@
y
=
null
@
x_axis
=
null
@
x_axis
=
null
...
@@ -61,7 +61,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph
...
@@ -61,7 +61,7 @@ class window.ContributorsMasterGraph extends ContributorsGraph
@
brush
=
null
@
brush
=
null
@
x_max_domain
=
null
@
x_max_domain
=
null
process_dates
:
(
data
)
->
process_dates
:
(
data
)
->
dates
=
@
get_dates
(
data
)
dates
=
@
get_dates
(
data
)
@
parse_dates
(
data
)
@
parse_dates
(
data
)
ContributorsGraph
.
set_dates
(
dates
)
ContributorsGraph
.
set_dates
(
dates
)
get_dates
:
(
data
)
->
get_dates
:
(
data
)
->
...
@@ -87,14 +87,16 @@ class window.ContributorsMasterGraph extends ContributorsGraph
...
@@ -87,14 +87,16 @@ class window.ContributorsMasterGraph extends ContributorsGraph
@
area
=
d3
.
svg
.
area
().
x
((
d
)
->
@
area
=
d3
.
svg
.
area
().
x
((
d
)
->
x
(
d
.
date
)
x
(
d
.
date
)
).
y0
(
@
height
).
y1
((
d
)
->
).
y0
(
@
height
).
y1
((
d
)
->
y
(
d
.
commits
=
d
.
commits
?
d
.
additions
?
d
.
deletions
)
xa
=
d
.
commits
=
d
.
commits
?
d
.
additions
?
d
.
deletions
console
.
log
(
xa
)
y
(
xa
)
).
interpolate
(
"basis"
)
).
interpolate
(
"basis"
)
create_brush
:
->
create_brush
:
->
@
brush
=
d3
.
svg
.
brush
().
x
(
@
x
).
on
(
"brushend"
,
@
update_content
)
@
brush
=
d3
.
svg
.
brush
().
x
(
@
x
).
on
(
"brushend"
,
@
update_content
)
draw_path
:
(
data
)
->
draw_path
:
(
data
)
->
@
svg
.
append
(
"path"
).
datum
(
data
).
attr
(
"class"
,
"area"
).
attr
(
"d"
,
@
area
)
@
svg
.
append
(
"path"
).
datum
(
data
).
attr
(
"class"
,
"area"
).
attr
(
"d"
,
@
area
)
add_brush
:
->
add_brush
:
->
@
svg
.
append
(
"g"
).
attr
(
"class"
,
"selection"
).
call
(
@
brush
).
selectAll
(
"rect"
).
attr
(
"height"
,
@
height
)
;
@
svg
.
append
(
"g"
).
attr
(
"class"
,
"selection"
).
call
(
@
brush
).
selectAll
(
"rect"
).
attr
(
"height"
,
@
height
)
update_content
:
=>
update_content
:
=>
ContributorsGraph
.
set_x_domain
(
if
@
brush
.
empty
()
then
@
x_max_domain
else
@
brush
.
extent
())
ContributorsGraph
.
set_x_domain
(
if
@
brush
.
empty
()
then
@
x_max_domain
else
@
brush
.
extent
())
$
(
"#brush_change"
).
trigger
(
'change'
)
$
(
"#brush_change"
).
trigger
(
'change'
)
...
@@ -126,8 +128,8 @@ class window.ContributorsAuthorGraph extends ContributorsGraph
...
@@ -126,8 +128,8 @@ class window.ContributorsAuthorGraph extends ContributorsGraph
@
width
=
490
@
width
=
490
else
else
@
width
=
380
@
width
=
380
@
height
=
13
0
@
height
=
20
0
@
x
=
null
@
x
=
null
@
y
=
null
@
y
=
null
@
x_axis
=
null
@
x_axis
=
null
...
...
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