Jump to content
  • 0

Can I Add Space Between Title and Axis


Question

1 answer to this question

Recommended Posts

  • 0

Hello @deemuss

It is possible using additional JS code. 
You need to insert the following code into the Header of the Chart result section:

<script type="text/javascript">
document.addEventListener('DataPageReady', chartUpdateHandler)

function chartUpdateHandler(event) {
 var cleaner = function(interv) {
  clearInterval(interv);
 }

 let interv = setInterval(() => {
  if (!!Highcharts.charts[0]) {
   console.log(Highcharts.charts[0]);
   Highcharts.charts[0].update({
    xAxis: {
     title: {
      margin: 100 //change this value to change the space
     }
    },
    yAxis: {
     title: {
      margin: 100 //change this value to change the space
     }
    }
   });   
   cleaner(interv);
  }
 }, 200);
}
</script>

Note that you need to disable the HTML editor of the Header in the Advanced section.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...