DanielCW
DanielCW

Reputation: 149

HighCharts - Need more space between bottom of chart and Xaxis labels

I am trying to get more space between my highcharts plotArea and the xAxis... nothing so far seems to be working. The picture shows how close they are and I am wanting to add about 30 more px to it.

Thank you for the help!!

enter image description here

Upvotes: 2

Views: 6179

Answers (2)

Sebastian Bochan
Sebastian Bochan

Reputation: 37578

You can try to set min/maxPadding http://api.highcharts.com/highstock#yAxis.minPadding

Upvotes: 0

mg1075
mg1075

Reputation: 18155

Assuming I unerstand your question correctly...

Here is a standard xAxis and an altered yAxis from the Highcharts documentation.

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/xaxis/labels-x/


Now, here is a fork of that fiddle, but with the labels of the xAxis pushed further down.

http://jsfiddle.net/BCPL5/

The relevant Highcharts API documentation:
http://api.highcharts.com/highcharts#xAxis.labels


The alteration to the xAxis is in this statement.

    ...

    xAxis: {
        labels: {
            y: 25
        }
    },

    ...

Now, you could also use offset, as can be seen in the Highcharts example below, but I don't believe that is what you want in this case.

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/yaxis/offset/

Upvotes: 4

Related Questions