black horizontal line from 0 in Y axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

black horizontal line from 0 in Y axis

Post by Neelam » Wed Mar 03, 2010 12:34 pm

Hi
I want to know how can i draw a black horizontal line from 0 in Y axis which goes till the Right axis of chart.There are negative values to show in the bar chart and so we need this to clearly show the left axis at 0 level. I have uploaded the screenshot of what i am looking for.

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Re: black horizontal line from 0 in Y axis

Post by Neelam » Wed Mar 03, 2010 12:40 pm

Screenshot name is Screenshot.docx.

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

Re: black horizontal line from 0 in Y axis

Post by Yeray » Wed Mar 03, 2010 4:28 pm

Hi shikha,

You could use a color line tool or you could draw a line directly to the canvas manually:

Code: Select all

        void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
        {
            tChart1.Graphics3D.Pen.Color = Color.Red;
            tChart1.Graphics3D.Line(new Point(tChart1.Axes.Bottom.IStartPos, tChart1.Axes.Left.CalcPosValue(0)), new Point(tChart1.Axes.Bottom.IEndPos,tChart1.Axes.Left.CalcPosValue(0)));
        }
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

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Re: black horizontal line from 0 in Y axis

Post by Neelam » Thu Mar 04, 2010 10:22 am

it worked!! Thanks a tonne.

Post Reply