You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was looking at Apex Charts to be able to show severity based on the series value through use of colour. After much search I realised I could used a solid fill and specify colours based on value but this is not as visually appealing as a continuously changing gradient. Effectively I would like to be able to do a circular version of the image below. Any ideas?
edit: I have come up with this so that the fill changes but I would prefer to have the graph change colour in a rainbow fashion instead of being a solid colour according to the series value.
fill: {
type: 'solid',
colors: [function({ value, seriesIndex, w }) {
var green = Math.min(255,(Math.round(5.1 * value))).toString(16).padStart(2, '0').toUpperCase()
var red = (Math.min(255,(Math.round(510 - 5.1 * value)))).toString(16).padStart(2, '0').toUpperCase()
return '#' + red + green + '00';
}]
}
};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Was looking at Apex Charts to be able to show severity based on the series value through use of colour. After much search I realised I could used a solid fill and specify colours based on value but this is not as visually appealing as a continuously changing gradient. Effectively I would like to be able to do a circular version of the image below. Any ideas?

edit: I have come up with this so that the fill changes but I would prefer to have the graph change colour in a rainbow fashion instead of being a solid colour according to the series value.
Beta Was this translation helpful? Give feedback.
All reactions