Page 1 of 1

ShapeStyles.Line to Point Outwards Around a Circle

Posted: Wed Jan 26, 2011 9:55 am
by 15657280
Using:
Steema.TeeChart.Styles.ShapeStyles.Line;

Could you please show me how to orientate around a circle:
Say 4 series pointing outwards with the following (conventional) coordinates:

(x0,y0) (x1,y1)
45 % (0,0) ( 1, 1)
135% (0,0) (-1,1)
225% (0,0) (-1,-1), and,
315% (0,0) ( 1,-1)

I have spent several hours on this. The behaviour of the underlying methid seems to change with the orientation and so I cannot get a consistent result.

Re: ShapeStyles.Line to Point Outwards Around a Circle

Posted: Wed Jan 26, 2011 11:40 am
by 10050769
Hello Ivan_vS,

X0, Y0, X1 and Y1 coordinates in Shape series are used to define shape's bounding rectangle. This can be best appreciated using ellipse or rectangle as ShapeStyle. To get lines behaving as you request you'd better use standard Line series instead Shape series. You can do something as next example code :

Code: Select all

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

            tChart1.Aspect.View3D = false;
            for (int i = 0; i < 4; i++)
            {
                new Steema.TeeChart.Styles.Line(tChart1.Chart);
                if (i == 0)
                {
                    tChart1[i].Add(0, 0);
                    tChart1[i].Add(1, 1);
                }
                else if (i == 1)
                {
                    tChart1[i].Add(0, 0);
                    tChart1[i].Add(-1, 1);
                }
                else if (i == 2)
                {
                    tChart1[i].Add(0, 0);
                    tChart1[i].Add(-1, -1);
                }
                else if (i == 3)
                {
                    tChart1[i].Add(0, 0);
                    tChart1[i].Add(1, -1);
                }
            }

        }
I hope will helps.

Thanks,