最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin6PV0评论

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!!

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!!

Share Improve this question asked Mar 2, 2013 at 17:12 DanielCWDanielCW 1491 silver badge14 bronze badges 1
  • 1 Can you explain it better ? – Ricardo Lohmann Commented Mar 4, 2013 at 0:11
Add a ment  | 

2 Answers 2

Reset to default 4

Assuming I unerstand your question correctly...

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

http://jsfiddle/gh/get/jquery/1.7.2/highslide-software/highcharts./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/BCPL5/

The relevant Highcharts API documentation:
http://api.highcharts./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/gh/get/jquery/1.7.2/highslide-software/highcharts./tree/master/samples/highcharts/yaxis/offset/

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

Post a comment

comment list (0)

  1. No comments so far