Page 1 of 1

Gantt Connectinglines are not visible!

Posted: Thu Jul 10, 2008 7:43 am
by 9788246
Hi...
I try to create a gantt chart, which shoud show connected tasks.
It works fine except the connecting lines. They are not being shown.
Could you please help me.

Code: Select all

//tChart1.Series.Clear();
            tChart1.Legend.Visible = false;

            DataTable table = new DataTable();
            table.Columns.Add("Label", typeof(string));
            table.Columns.Add("Y", typeof(double));            
            table.Columns.Add("Start", typeof(DateTime));
            table.Columns.Add("End", typeof(DateTime));
            table.Columns.Add("NextTask", typeof(int));

      
            

            for (int i = 0; i < 5; i++)
            {
                DataRow dRow = table.NewRow();
                dRow["Label"] = i.ToString();

                dRow["Y"] = i;

                if (i != 4)
                    dRow["NextTask"] = i+1;
                else
                    dRow["NextTask"] = -1;

                dRow["Start"] = DateTime.Now.AddDays(i*2);
                dRow["End"] = DateTime.Now.AddDays(i*2 + 1);            
               
                table.Rows.Add(dRow);

            }

            Gantt gannt = new Gantt();
            gannt.Pointer.Brush.Color = System.Drawing.Color.Red;          
            
           
            //gannt.ColorEach = false;
            gannt.DataSource = table;           

            gannt.EndValues.DataMember = "End";
            gannt.EndValues.DateTime = true; 
            gannt.LabelMember = "Label";           

            gannt.StartValues.DataMember = "Start";
            gannt.StartValues.DateTime = true;            
            gannt.XValues.DataMember = "Start";
            gannt.XValues.DateTime = true;            
            gannt.YValues.DataMember = "Y"; 
            gannt.NextTasks.DataMember = "NextTask";
            tChart1.Series.Add(gannt);           
            gannt.LinePen.Visible = true;
            gannt.LinePen.Width = 2; 
            gannt.CheckDataSource();


[/code]

Posted: Thu Jul 10, 2008 8:59 am
by narcis
Hi MU,

This works fine for me here using latest TeeChart for .NET v3 build available at the client area, which was posted on 2nd July (build 3.5.3105.20150/1/2). I'm just dropping a TChart in a form and using the very same code as you. Which TeeChart version are you using?

Posted: Thu Jul 10, 2008 9:28 am
by 9788246
I use the version "2.0.2040.15119"

Posted: Thu Jul 10, 2008 9:35 am
by 9788246
Hi Narcis,
It works finew,with the version "2.0.3033.18431"
Thanyk you..

Posted: Thu Jul 10, 2008 9:43 am
by narcis
Hi MU,

That's not latest v2 release either. It also works fine for me here using build 2.0.3033.18430/31 from April 2008. Could you please try if this version works fine for you?

Thanks in advance.

Posted: Thu Jul 10, 2008 11:52 am
by 9788246
Hi Narcis,
It works fine,with the version "2.0.3033.18431"
Thanks..