Is there a way to change the color of a bar on Apex charts below a specific value? For example when a weight above 200 lbs the bar changes red.
Here is the code I am working with but I am not quite sure what I am supposed to put for value, seriesIndex, and w
colors: ['#02DFDE'],
fill: {
colors: [function({ value, seriesIndex, w }) {
if(value < 360) {
return '#FF0000'
} else {
return '#02DFDE'
}
}]
},
If you want to set the color based on value, then this function will suffice
Full example - https://codepen.io/apexcharts/pen/RwRNXzX?editors=0010