Jump to content
  • 0

Move Charts Title to the Left


Question

1 answer to this question

Recommended Posts

  • 0

Hi Astroboy,

I have a piece of Javascript code with me that might do the trick for you. You may paste this code on the footer inside your DataPage, but make sure to disable the HTML editor on the advanced tab. Here's the code:

<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({
    title: {
        text: 'Insert Text Here',
        align: 'left',
        x: 70
    }
   });   
   cleaner(interv);
  }
 }, 200);
}
</script>

 

Note: You have to insert the title that you want to use directly on this code. To do that, simply replace the text *Insert Text Here* with the title that you want to set for your chart.

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