I am currently utilizing Angular Highcharts 9.1.0 and facing an issue with generating a word cloud that incorporates specific colors. Despite including color values in the array, they do not seem to be applied as intended. Take a look at the code snippet below:
this.options = {
series: [{
type: 'wordcloud',
data,
name: 'Occurrences',
minFontSize: 12,
maxFontSize: 42,
colors: [ 'red', 'green', 'blue']
}]
};
Even attempting Hex colors has not provided the desired outcome. One workaround involves manipulating CSS properties through styled mode, which generates multiple classes (.highcharts-color-X where X is 0-9) that need adjusting based on colors. This method feels restrictive as it lacks randomness in assigning colors to individual words. Ideally, I would prefer Highcharts to handle this task smoothly but the above code snippet seems ineffective. The documentation suggests ensuring colorByPoint
is set to true, although it should default to true. Manual adjustments have also been unsuccessful in producing the desired result.
Below is a snapshot showcasing the word cloud generated using the mentioned options: