Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jorge SOUSA
Wiki
Commits
2e10aa5f
Commit
2e10aa5f
authored
10 months ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
axis top plus little padding
parent
7fa1c73b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/OperonStructure.vue
+6
-7
6 additions, 7 deletions
components/OperonStructure.vue
with
6 additions
and
7 deletions
components/OperonStructure.vue
+
6
−
7
View file @
2e10aa5f
...
...
@@ -17,9 +17,9 @@ const props = withDefaults(defineProps<Props>(), {
const
height
=
ref
<
number
>
(
200
)
const
svgRef
=
ref
<
SVGElement
|
null
>
(
null
)
const
margin
=
ref
<
PlotMargin
>
({
marginTop
:
1
0
,
marginTop
:
5
0
,
marginRight
:
7
,
marginBottom
:
40
,
marginBottom
:
1
,
marginLeft
:
7
,
})
...
...
@@ -35,7 +35,7 @@ const domain = computed(() => {
return
genes
?.
map
(
d
=>
{
return
d
.
gene
})
})
const
innerPadding
=
ref
<
number
>
(
0.
5
)
const
innerPadding
=
ref
<
number
>
(
5
)
const
totalGeneLength
=
computed
(()
=>
{
const
genes
=
toValue
(
computedGenes
)
...
...
@@ -47,7 +47,6 @@ const totalGeneLength = computed(() => {
const
domainGenes
=
computed
(()
=>
{
return
[
0
,
totalGeneLength
.
value
]
})
const
xScale
=
computed
(()
=>
{
return
d3
.
scaleBand
()
...
...
@@ -144,11 +143,11 @@ function draw() {
if
(
svgRef
.
value
!==
null
)
{
const
svg
=
d3
.
select
<
SVGElement
,
undefined
>
(
svgRef
.
value
);
const
{
marginLeft
}
=
toValue
(
margin
)
const
xAxis
=
d3
.
axis
Bottom
(
xScale
.
value
)
const
{
marginLeft
,
marginTop
}
=
toValue
(
margin
)
const
xAxis
=
d3
.
axis
Top
(
xScale
.
value
)
const
gx
=
createOrSelect
(
svg
,
'
g
'
,
'
x-axis
'
)
gx
.
attr
(
"
transform
"
,
`translate(
${
marginLeft
}
,
${
toValue
(
height
)
+
5
}
)`
)
.
attr
(
"
transform
"
,
`translate(
${
marginLeft
}
,
${
marginTop
}
)`
)
.
call
(
xAxis
)
gx
.
call
(
g
=>
g
.
select
(
"
.domain
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment