score:2

You should configure these callbacks in the options of your chart. It's cleaner that way:

function moveLabels(){
    $('.highcharts-axis-labels.highcharts-xaxis-labels text').first().attr('x', 25);
    $('.highcharts-axis-labels.highcharts-xaxis-labels text').last().attr('x', 813);
}

$('#container').highcharts({
    chart: {
        events: {
            load: moveLabels
            redraw: moveLabels
           }
        }
    },
    ...

Related Query

More Query from same tag