apexcharts / react-apexcharts

📊 React Component for ApexCharts
https://apexcharts.com
MIT License
1.31k stars 159 forks source link

Dumbbell Colors: Choosing specific colors per each datapoint #603

Open ADAS-sola-samuel opened 6 months ago

ADAS-sola-samuel commented 6 months ago

Hello, I'm struggling to get my dumbbell apexchart to render a specific datapoint in a sperate color. I've tried to put in more than one pair of HEX values and even mapping the datapoints and using an if statement to return a different pairing on the index of the focused datapoint but it seems to just ignore it and use the first pairing. If you could put together an example, that would be great. Thanks!

Here is what I've got in my options: dumbbellColors: mappedData?.map(element => { if (element.x !== val) { return ['#008FFB', '#00E396'] } else { return ['#f5e960', '#dfb2f4'] } })

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.