Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sanity Exhibition Nansen
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
Utstillinger
Sanity Exhibition Nansen
Commits
75d5d5fe
Commit
75d5d5fe
authored
3 years ago
by
Tarje.Lavik
Browse files
Options
Downloads
Patches
Plain Diff
Fix dark theme on labels
parent
7c0b915e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/components/Sections/SingleLevelChart.js
+9
-3
9 additions, 3 deletions
web/components/Sections/SingleLevelChart.js
with
9 additions
and
3 deletions
web/components/Sections/SingleLevelChart.js
+
9
−
3
View file @
75d5d5fe
import
{
Box
}
from
'
@chakra-ui/react
'
import
{
Box
,
useColorModeValue
}
from
'
@chakra-ui/react
'
import
{
ResponsivePie
}
from
'
@nivo/pie
'
import
Caption
from
'
./shared/caption
'
...
...
@@ -13,6 +13,10 @@ export default function SingleLevelChart(props) {
return
null
}
const
theme
=
{
textColor
:
useColorModeValue
(
'
#222
'
,
'
#fff
'
),
}
const
{
data
,
caption
,
label
}
=
props
return
(
...
...
@@ -20,15 +24,17 @@ export default function SingleLevelChart(props) {
<
Box
h
=
"
sm
"
>
<
ResponsivePie
data
=
{
JSON
.
parse
(
data
.
code
)}
theme
=
{
theme
}
margin
=
{{
top
:
10
,
right
:
160
,
bottom
:
10
,
left
:
160
}}
startAngle
=
{
-
25
}
innerRadius
=
{
0.5
}
padAngle
=
{
1
}
cornerRadius
=
{
3
}
activeOuterRadiusOffset
=
{
8
}
borderWidth
=
{
1
}
borderColor
=
{{
from
:
'
color
'
,
modifiers
:
[[
'
darker
'
,
0.2
]]
}}
arcLinkLabelsSkipAngle
=
{
10
}
arcLinkLabelsTextColor
=
"
#333333
"
arcLinkLabelsSkipAngle
=
{
8
}
//
arcLinkLabelsTextColor=
{labelColor}
arcLinkLabelsThickness
=
{
2
}
arcLinkLabelsColor
=
{{
from
:
'
color
'
}}
arcLabelsSkipAngle
=
{
10
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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