Bar Chart Auto Size Issues

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
user2016
Newbie
Newbie
Posts: 6
Joined: Wed Mar 02, 2016 12:00 am

Bar Chart Auto Size Issues

Post by user2016 » Sat Jul 23, 2016 4:11 am

how can I make gaps between 2 bars, without sticking to each other as attached.
Attachments
TeeChart-Bar.png
TeeChart-Bar.png (7.03 KiB) Viewed 5098 times

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

Re: Bar Chart Auto Size Issues

Post by Christopher » Tue Jul 26, 2016 7:57 am

Hello,

You can use BarWidthPercent, as in this short example:

Code: Select all

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;

      Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
      bar1.Add(3, 10);
      bar1.Add(3.5, 10);

      bar1.BarWidthPercent = 50;
    }
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