javascriptjqueryhighcharts

Highcharts Polar Chart customization


I'am having problems with polar chart customization. I would like to move data labels by 45° to the right.

Here's the fiddle and this is the result I would like to get: result

  1. Is it possible to do that with Polar Chart (it has to be Polar Chart)?
  2. Is this the right way to define label text?

    var categories = ['These', 'are', 'test', 'data'],
    count = 0;
    /* ... */
        labels: {
            formatter: function () {
                var value = categories[count];
    
                count++;
                if (count == 5) {
                    count = 0;
                }
    
                return value;
            }
        }
    

Solution

  • Getting the behaviour you want is a combination of two things:

    For example:

    var categories = ['These', 'are', 'test', 'data'],
    count = 0;
    
    $('#container').highcharts({
        // ...        
        xAxis: {
            // ...
            categories: categories,
            // ...
        },
        // ...
        series: [{
            // ...
            pointPlacement: 'between',
            // ...
        }]
    });