Bar series pen

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Nick
Newbie
Newbie
Posts: 9
Joined: Wed May 14, 2008 12:00 am

Bar series pen

Post by Nick » Thu Feb 05, 2009 9:27 pm

Hello,

I'll put together a small example, but I've got a bar chart where I draw a line horizontally at 0 across the chart. When I set series.Pen.Visible = false; the bar is slightly above the line. What I really want to do is set the pen color to the same as the bar. Right now it's slightly darker shade of the color being used in the bar. Can that be done?

Thanks,
Nick

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Feb 06, 2009 4:10 pm

Hi Nick,
I've got a bar chart where I draw a line horizontally at 0 across the chart. When I set series.Pen.Visible = false; the bar is slightly above the line.


With the code snippet below it also happens with the bottom axis. So I think this is a bug. I've added it to the defect list (TF02013846) to be enhanced for future releases.

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

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

			Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
			bar1.FillSampleValues();

			bar1.Pen.Visible = false;
		}
What I really want to do is set the pen color to the same as the bar. Right now it's slightly darker shade of the color being used in the bar. Can that be done?
Yes, by default pen colors are a little bit shaded for aesthetic purposes. However you can achieve what you request using this:

Code: Select all

			bar1.Pen.Color = bar1.Color;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply