3

I have spiderweb highchart with dynamically calculated x/y values and all labels of y-axis are displayed correctly except the last one. Did anyone have same problem?

function GenerateSpiderWebChart(conteinerId,categories,values, color) {

    $('#'+conteinerId).highcharts({

        chart: {
            polar: true,
            type: 'line',
            margin: 0
        },

        colors: [
            color
        ],

        exporting: {
            enabled: false,
            buttons: {
                enabled: false
            }
        },

        title: {
            text: '&nbsp',
            x: -80,
            useHTML: true
        },

        pane: {
            size: '70%'
        },

        xAxis: {
            categories: categories,
            tickmarkPlacement: 'on',
            lineWidth: 0,
            labels: {
                align: 'center',
                distance: 43
            }
        },

        yAxis: {
            gridLineInterpolation: 'polygon',
            lineWidth: 0,
            min: 0,
            endOnTick: true
        },

        tooltip: {
            shared: true,
            headerFormat: '<span style="font-size: 12px">{point.key}:</span>&nbsp;&nbsp;<b>{point.y:,.2f}</b>',
            pointFormat: '',
            useHTML: true
        },

        legend: {
        enabled: false,
        align: 'right',
        verticalAlign: 'top',
        y: 70,
        layout: 'vertical'
        },

        series: [{
            name: '',
            data: values,
            pointPlacement: 'on'
        }]

    });
}
Mike Zavarello
  • 3,514
  • 4
  • 29
  • 43
Igor
  • 33
  • 3
  • Do you have a working fiddle? – Swetha Sep 17 '14 at 13:39
  • 1
    Set [xAxis.showLastLabel](http://api.highcharts.com/highcharts#xAxis.showLastLabel) to true. API says "Defaults to true." but it is not true in this case. Example: [http://jsfiddle.net/02mssxy8/1/](http://jsfiddle.net/02mssxy8/1/) – Kacper Madej Sep 17 '14 at 14:46
  • Thanks a lot Kacper, it works (btw, it is yAxis.showLastLabel as you did it in the example). I can't believe i missed that parameter from the API, i was reading them one by one :) – Igor Sep 18 '14 at 06:50

1 Answers1

6

Set yAxis.showLastLabel to true. API says "Defaults to true." but it is not true in this case. Example: http://jsfiddle.net/02mssxy8/1/

showLastLabel: true
Kacper Madej
  • 7,846
  • 22
  • 36