X-axis HighCharts Labeling

how to make a pointInterval going along the x axis has some space between the x axis and itself, since pointInterval rotates in my case, this is what is connected with the x axis. I tried to add a gasket, but in vain.

labels: {
                    rotation: (chartType == 3 ? 0 : -60),
                    align: 'right',
                    style: {
                        fontSize: '14px',
                        fontFamily: 'proxima-nova,helvetica,arial,sans-seri',
                        whiteSpace: 'nowrap',
                        padding:'[100px 100px 100px 100px]'


                    }
                }
+4
source share
1 answer

In general, you can install useHTML: trueand paddingLeft/Right/Top/Bottomseparately. See: http://jsfiddle.net/3bQne/1030/

Note. This solution will not work for exported charts.

var chart = new Highcharts.Chart({
    chart: {
        renderTo: 'container'
    },
    xAxis: {
        categories: ['01/02/2012', '01/03/2012', '01/04/2012', '01/05/2012', '01/06/2012', '01/07/2012'],
        labels: {
            rotation: -60,
            align: 'right',
            useHTML: true,                
            style: {
                fontSize: '14px',
                fontFamily: 'proxima-nova,helvetica,arial,sans-seri',
                whiteSpace: 'nowrap',
                paddingLeft: '10px',
                paddingRight: '10px',
                paddingTop: '10px',
                paddingBottom: '10px',


            }
        }
    },

    series: [{
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0]
    }]
});
+4
source

Source: https://habr.com/ru/post/1532667/


All Articles