Space/Separation between bars with TeeChart for .Net

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
David N.
Newbie
Newbie
Posts: 8
Joined: Wed May 17, 2023 12:00 am

Space/Separation between bars with TeeChart for .Net

Post by David N. » Thu Jun 22, 2023 8:46 am

Hello,

When i plot two bars the separation between them is a bit too much, what could i do to shorten this distance?
Image

How could o control the space between bars independently of how many there are?

Thank you.
Attachments
Image.png
Image.png (8.65 KiB) Viewed 11574 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Space/Separation between bars with TeeChart for .Net

Post by Christopher » Thu Jun 22, 2023 4:21 pm

Hello,
David N. wrote:
Thu Jun 22, 2023 8:46 am
When i plot two bars the separation between them is a bit too much, what could i do to shorten this distance?
This can be achieved by compressing the bottom axis with offset pixels, e.g.

Code: Select all

       public Form1()
        {
            InitializeComponent();

            var bar = new Bar(tChart1.Chart);

            bar.Add(1);
            bar.Add(10);

            tChart1.Axes.Bottom.MinimumOffset = 170;
            tChart1.Axes.Bottom.MaximumOffset = 170;
        }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply