fix: only apply padding if top/bottom axis labels are given
This commit is contained in:
@@ -442,10 +442,15 @@ export function AnimatedLineGraph({
|
||||
pulseTrigger
|
||||
)
|
||||
|
||||
const axisLabelContainerStyle = {
|
||||
paddingTop: TopAxisLabel != null ? 20 : 0,
|
||||
paddingBottom: BottomAxisLabel != null ? 20 : 0,
|
||||
}
|
||||
|
||||
return (
|
||||
<View {...props}>
|
||||
<GestureDetector gesture={enablePanGesture ? gesture : undefined}>
|
||||
<ReanimatedView style={[styles.container, styles.axisLabelContainer]}>
|
||||
<ReanimatedView style={[styles.container, axisLabelContainerStyle]}>
|
||||
{/* Top Label (max price) */}
|
||||
{TopAxisLabel != null && (
|
||||
<View style={styles.axisRow}>
|
||||
@@ -548,9 +553,6 @@ const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
},
|
||||
axisLabelContainer: {
|
||||
paddingVertical: 20,
|
||||
},
|
||||
axisRow: {
|
||||
height: 17,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user