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
Sascha Herzinger
AdaCharts
Commits
facad50f
Commit
facad50f
authored
Jan 23, 2019
by
Sascha Herzinger
Browse files
fixed wrapping issue
parent
e36dadd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/test-heatmap.html
View file @
facad50f
...
...
@@ -78,8 +78,8 @@
valueRange
:
[
-
1
,
1
],
sequential
:
true
,
textToChartRatio
:
0.15
,
colLabelPos
:
'
bot
to
m
'
,
// top or bottom
rowLabelPos
:
'
righ
t
'
,
// left or right
colLabelPos
:
'
to
p
'
,
// top or bottom
rowLabelPos
:
'
lef
t
'
,
// left or right
xLabel
:
'
X Axis Label
'
,
yLabel
:
'
Y Axis Label
'
,
tooltipValuePrefix
:
'
Value  
'
,
...
...
src/charts/impl/Heatmap.js
View file @
facad50f
...
...
@@ -230,9 +230,7 @@ export default class extends Chart {
})
.
merge
(
rowLabels
)
.
style
(
'
font-size
'
,
`
${
this
.
yScale
.
bandwidth
()
>
MAX_FONT_SIZE
?
MAX_FONT_SIZE
:
this
.
yScale
.
bandwidth
()}
px`
)
.
each
((
_
,
i
,
arr
)
=>
{
wrap
(
arr
[
i
],
this
.
margin
.
left
-
AXIS_LABEL_FONT_SIZE
-
ROW_COL_LABELS_OFFSET
);
});
.
each
((
_
,
i
,
arr
)
=>
wrap
(
arr
[
i
],
(
this
.
rowLabelPos
===
'
left
'
?
this
.
margin
.
left
:
this
.
margin
.
right
)
-
AXIS_LABEL_FONT_SIZE
-
ROW_COL_LABELS_OFFSET
));
rowLabels
.
transition
()
...
...
@@ -271,7 +269,7 @@ export default class extends Chart {
})
.
merge
(
colLabels
)
.
style
(
'
font-size
'
,
`
${(
this
.
xScale
.
bandwidth
()
>
MAX_FONT_SIZE
?
MAX_FONT_SIZE
:
this
.
xScale
.
bandwidth
())
-
1
}
px`
)
.
each
((
_
,
i
,
arr
)
=>
wrap
(
arr
[
i
],
this
.
margin
.
top
));
.
each
((
_
,
i
,
arr
)
=>
wrap
(
arr
[
i
],
(
this
.
colLabelPos
===
'
top
'
?
this
.
margin
.
top
:
this
.
margin
.
bottom
)
-
AXIS_LABEL_FONT_SIZE
-
ROW_COL_LABELS_OFFSET
));
colLabels
.
transition
()
...
...
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