0

I am using highcharts to make some graphics. There are 3 graphics inside the same highchart, but my problem is that the highchart start with some padding at the left, like this: enter image description here

I want it to look like this: (Edited with photoshop)

enter image description here

Help please

1

1 Answer 1

0

That question has been asked several times (I don't remember link), but in general don't use categorized xAxis, but use standard linear with specific label formatter, for example: http://jsfiddle.net/3bQne/266/

    var categories = ['01/02/2012','01/03/2012','01/04/2012','01/05/2012','01/06/2012','01/07/2012'];

var chart2 = new Highcharts.Chart({
    chart: {
        renderTo: 'container2'
    },
    xAxis: {
        labels: {
            formatter: function() {
                return categories[this.value];   
            }
        }
    },

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

Now you can play around with startOnTick and minPadding. For categorized axis this is not possible to change space distribution - it's always evenly divided between all points.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.