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
49dd4a57
Commit
49dd4a57
authored
Jan 13, 2020
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment with explanation
parent
c8395bda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
app/assets/javascripts/vue_shared/components/bar_chart.vue
app/assets/javascripts/vue_shared/components/bar_chart.vue
+7
-0
No files found.
app/assets/javascripts/vue_shared/components/bar_chart.vue
View file @
49dd4a57
...
...
@@ -151,6 +151,13 @@ export default {
this
.
yScale
=
d3
.
scaleLinear
().
rangeRound
([
this
.
vbHeight
,
0
]);
this
.
xScale
.
domain
(
this
.
graphData
.
map
(
d
=>
d
.
name
));
/*
If we have all-zero graph we want graph to center 0 on axis and not to draw
any kind of ticks on Y axis. Infinity allows us to do that.
See https://gitlab.com/gitlab-org/gitlab/merge_requests/20627#note_251484582
for detailed explanation
*/
this
.
yScale
.
domain
([
0
,
d3
.
max
(
this
.
graphData
.
map
(
d
=>
d
.
value
))
||
Infinity
]);
// Zoom/Panning Function
...
...
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