Position legend above the graph when it would otherwise go off the screen
parent
16a55d3053
commit
a0ad154ce0
|
@ -368,7 +368,7 @@ export default class Dygraph extends Component {
|
|||
const isLegendBottomClipped = graphBottom + legendHeight > screenHeight
|
||||
|
||||
const legendTop = isLegendBottomClipped
|
||||
? graphHeight + 8 - legendHeight
|
||||
? -(legendHeight + 8)
|
||||
: graphHeight + 8
|
||||
|
||||
this.legendRef.style.left = `${legendLeft}px`
|
||||
|
|
Loading…
Reference in New Issue