Chart margins

TeeChart for Javascript for the HTML5 Canvas
Post Reply
Jim Green
Newbie
Newbie
Posts: 43
Joined: Thu Aug 03, 2006 12:00 am

Chart margins

Post by Jim Green » Wed Jul 09, 2014 3:32 pm

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.

Yeray
Site Admin
Site Admin
Posts: 8719
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Chart margins

Post by Yeray » Fri Jul 11, 2014 7:06 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Jim Green
Newbie
Newbie
Posts: 43
Joined: Thu Aug 03, 2006 12:00 am

Re: Chart margins

Post by Jim Green » Fri Jul 11, 2014 11:41 am

It actually does help, though. Thanks!

Post Reply