Set HeatMap Colors
mainYou can customize the color scheme of the heatmap using the panelColors prop and the style prop.
Using an Object for panelColors
Provide an object where keys are specific count thresholds and values are the colors for those levels.
Using an Array for panelColors
Provide an array of colors. The component will automatically distribute these colors dynamically based on the maximum value in your data.
Styling
You can use the style prop to pass CSS variables like --rhm-rect-active to control the active rectangle color.
// Example with Object mapping
<HeatMap
value={value}
panelColors={{
0: '#f4decd',
7: '#e4b293',
14: '#d48462',
21: '#c2533a',
28: '#ad001d',
35: '#6c0012'
}}
style={{ color: '#ad001d', '--rhm-rect-active': 'red' }}
/>
// Example with Dynamic Array mapping
<HeatMap
value={value}
panelColors={['#f4decd', '#e4b293', '#d48462', '#c2533a', '#ad001d', '#6c0012']}
style={{ color: '#ad001d', '--rhm-rect-active': 'red' }}
/>