In my scenario, I am using react-native-svg-chart to displaying BarChart with only BarChart data. Here, general fill colour for BarChart I given in render. Now, I want to achieve bar-chart last index bar should show red colour. How to achieve this in render logic like below.
<BarChart style={Styles.chartStyle} data={props.data} numberOfTicks={props.numberOfTicks} spacingInner={12} spacingOuter={12} contentInset={Styles.verticalContentInset} gridMax={props.yMax} gridMin={0} svg={{ fill: props.data.length -1 ? 'red' : 'green'}} // How to make it here, array of last index data only green color?</BarChart>