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
54a35028
Commit
54a35028
authored
Jan 20, 2020
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Downgrade D3 to 4.13
parent
fd74d775
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
47 deletions
+98
-47
app/assets/javascripts/vue_shared/components/bar_chart.vue
app/assets/javascripts/vue_shared/components/bar_chart.vue
+4
-9
package.json
package.json
+1
-1
yarn.lock
yarn.lock
+93
-37
No files found.
app/assets/javascripts/vue_shared/components/bar_chart.vue
View file @
54a35028
...
...
@@ -124,7 +124,9 @@ export default {
},
},
mounted
()
{
this
.
draw
();
if
(
!
this
.
allValuesEmpty
)
{
this
.
draw
();
}
},
methods
:
{
draw
()
{
...
...
@@ -151,14 +153,7 @@ 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
]);
this
.
yScale
.
domain
([
0
,
d3
.
max
(
this
.
graphData
.
map
(
d
=>
d
.
value
))]);
// Zoom/Panning Function
this
.
zoom
=
d3
...
...
package.json
View file @
54a35028
...
...
@@ -66,7 +66,7 @@
"
core-js
"
:
"
^3.2.1
"
,
"
cropper
"
:
"
^2.3.0
"
,
"
css-loader
"
:
"
^1.0.0
"
,
"
d3
"
:
"
^
5.12
.0
"
,
"
d3
"
:
"
^
4.13
.0
"
,
"
d3-scale
"
:
"
^1.0.7
"
,
"
d3-selection
"
:
"
^1.2.0
"
,
"
dateformat
"
:
"
^3.0.3
"
,
...
...
yarn.lock
View file @
54a35028
This diff is collapsed.
Click to expand it.
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