Page 1 of 1

black horizontal line from 0 in Y axis

Posted: Wed Mar 03, 2010 12:34 pm
by 13045482
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.

Re: black horizontal line from 0 in Y axis

Posted: Wed Mar 03, 2010 12:40 pm
by 13045482
Screenshot name is Screenshot.docx.

Re: black horizontal line from 0 in Y axis

Posted: Wed Mar 03, 2010 4:28 pm
by yeray
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)));
        }

Re: black horizontal line from 0 in Y axis

Posted: Thu Mar 04, 2010 10:22 am
by 13045482
it worked!! Thanks a tonne.