Page 1 of 1

Chart margins

Posted: Wed Jul 09, 2014 3:32 pm
by 9347097
Can I control the margins around the chart, especially to the left of the left axis? The HTML container that holds the chart already include padding/margins, and it's not necessary for the chart to add more.

I took a wild guess and tried

Code: Select all

  Chart1.axes.left.calcMargins =
    function() {
      return 0;
    }
but it doesn't appear to be called.

Thanks.

Re: Chart margins

Posted: Fri Jul 11, 2014 7:06 am
by yeray
Hello,

You can set the margins like this:

Code: Select all

Chart1.panel.margins.left=0;
Note the value expresses a percentage.
But by default they are set to 2, so changing to 0 won't make a very big difference.

Re: Chart margins

Posted: Fri Jul 11, 2014 11:41 am
by 9347097
It actually does help, though. Thanks!