Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractal.js
Commits
32863f7b
Commit
32863f7b
authored
Jul 12, 2017
by
Sascha Herzinger
Browse files
Fixed some spacing issues
parent
c9ce84cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/vue/charts/Boxplot.vue
View file @
32863f7b
...
...
@@ -128,8 +128,8 @@
margin
()
{
const
left
=
60
const
top
=
10
const
right
=
1
0
const
bottom
=
100
const
right
=
5
0
const
bottom
=
this
.
height
*
0.1
return
{
left
,
top
,
right
,
bottom
}
},
padded
()
{
...
...
@@ -152,18 +152,18 @@
const
values
=
this
.
results
.
data
.
map
(
entry
=>
this
.
results
.
variables
.
map
(
v
=>
entry
[
v
]))
const
flattened
=
[].
concat
.
apply
([],
values
)
const
extent
=
d3
.
extent
(
flattened
)
const
padding
=
(
extent
[
1
]
-
extent
[
0
])
/
1
0
const
padding
=
(
extent
[
1
]
-
extent
[
0
])
/
2
0
const
x
=
d3
.
scalePoint
()
.
domain
(
Object
.
keys
(
this
.
results
.
statistics
))
.
range
([
0
,
this
.
padded
.
height
])
.
range
([
0
,
this
.
padded
.
width
])
.
padding
(
0.5
)
const
y
=
d3
.
scaleLinear
()
.
domain
([
extent
[
0
]
-
padding
,
extent
[
1
]
+
padding
])
.
range
([
this
.
padded
.
width
,
0
])
.
range
([
this
.
padded
.
height
,
0
])
return
{
x
,
y
}
},
axis
()
{
const
x
=
d3
.
axisBottom
(
this
.
scales
.
x
).
tickFormat
(
d
=>
utils
.
truncate
({
fullStr
:
d
,
strLen
:
20
}))
const
x
=
d3
.
axisBottom
(
this
.
scales
.
x
).
tickFormat
(
d
=>
utils
.
truncate
({
fullStr
:
d
,
strLen
:
35
}))
const
y
=
d3
.
axisLeft
(
this
.
scales
.
y
)
return
{
x
,
y
}
}
...
...
@@ -326,4 +326,5 @@
.tick
text
text-anchor
:
start
font-size
:
14px
</
style
>
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