Karan
Karan

Reputation: 268

Have single color for all words in highcharts word cloud

I am just getting familiar with Highcharts word cloud. I am looking to solve a issue where I can have single color for all words in the word cloud using High charts. For example all words have a color red in the word cloud. I am using the default highcharts jsfiddle as example.

Highcharts.chart('container', {
series: [{
    type: 'wordcloud',
    data: data,
    name: 'Occurrences' 
}],
title: {
    text: ''
},
});

Upvotes: 0

Views: 870

Answers (2)

Jakub
Jakub

Reputation: 1

Highcharts.chart('container', {
series: [{
    type: 'wordcloud',
    data: data,
    name: 'Occurrences',
    color: 'red'

}],

plotOptions: {
  wordcloud: { 
               colorByPoint: false

  }
},
title: {
    text: 'Wordcloud of Lorem Ipsum'
} });

Upvotes: 0

Napoli
Napoli

Reputation: 1403

You really need to read the docs, all you need to do is specify only one color, as follows:

Highcharts.chart('container', {
    series: [{
        type: 'wordcloud',
        data: data,
        name: 'Occurrences',
        colors: [ 'red' ]
    }],
    ...

Upvotes: 1

Related Questions