react-native-charts-wrapper
react-native-charts-wrapper copied to clipboard
How to set xAxis width, margin or padding
how can i set config of xAxis to get the effect of expected. can u help me?? @wuxudong
Expected Behavior
Actual Behavior
Data and config
yAxis={{
left: { enabled: false },
right: {
enabled: true,
drawAxisLine: false,
drawGridLines: true,
textColor: processColor(color.black_989898),
textSize: 12 * screen.pxDp,
gridColor: processColor(color.black_F2F2F2),
gridLineWidth: 1 * screen.pxDp,
labelCount: 4,
labelCountForce: true,
valueFormatter: "###0.00%",
...(Platform.OS === "ios"
? { spaceTop: 0.1, spaceBottom: 0.1 }
: {})
}
}}
xAxis={{
enabled: true,
position: "BOTTOM",
drawAxisLine: false,
drawGridLines: false,
labelCount: 3,
labelCountForce: true,
textColor: processColor(color.black_989898),
textSize: 12 * screen.pxDp,
valueFormatter: "date",
granularityEnabled: true,
granularity: 1,
// centerAxisLabels: true,
avoidFirstLastClipping: true,
valueFormatterPattern: "YYYY-MM-dd",
yOffset: 6 * screen.pxDp
}}
viewPortOffsets={
Platform.OS === "ios"
? {
top: 8 * screen.pxDp,
right: 54 * screen.pxDp,
bottom: 21 * screen.pxDp,
left: 0
}
: undefined
}
Specifications
- Version: 0.5.0
- Platform: pic in ios, hope the same effect in android
Any help on this ?
any help ??
@EternalChildren any solution?
Also wondering if anyone ever found a solution
anyone??
any solution @marcosnovaesq @llaver @EternalChildren @SamiChab ?
I think it is solved by adding the hidden line in the end of actual line.