-
-
Notifications
You must be signed in to change notification settings - Fork 683
Open
Description
Hi guys, today I noticed that if we use the strokeDasharray property from propsForBackgroundLines on Android, it crashes without giving any error hints. (There is an error in Logcat, though, but it doesn’t help much.)
To replicate it:
const chartConfig = {
backgroundGradientFromOpacity: 0,
backgroundGradientToOpacity: 0,
color: () => colors.absolut.green,
labelColor: () => colors.button.dismiss.disabled,
decimalPlaces: 2,
strokeWidth: 2,
propsForDots: {
r: '0',
},
propsForBackgroundLines: {
// strokeDasharray: [], //this line causes the crash
stroke: colors.menu.tertiary,
strokeWidth: 1,
},
};
return (
...
<LineChart
data={{
labels: chartData.labels,
datasets: [{ data: chartData.data }],
}}
width={CHART_WIDTH}
height={220}
chartConfig={chartConfig}
withVerticalLines={false}
withHorizontalLines={true}
withInnerLines={true}
withOuterLines={false}
withShadow={false}
// fromZero
withVerticalLabels={true}
withHorizontalLabels={true}
style={styles.chart}
/>
...
)
Metadata
Metadata
Assignees
Labels
No labels