Shape problems after upgrading from V2 to V3

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
SDO
Newbie
Newbie
Posts: 1
Joined: Wed May 23, 2007 12:00 am

Shape problems after upgrading from V2 to V3

Post by SDO » Fri Apr 18, 2008 7:52 pm

Hopefully someone can help with this and I appologize if it has been covered before, but I couldn't find anything that matched my problem.
So, I had a working gantt with custom shapes in V2.x, but after upgrading to the latest version(april 4th release), the shapes lost their positions and now appear as a line vertically down the chart. I am displaying shapes this way:

Code: Select all

Steema.TeeChart.Styles.Shape shpPyramid = new Steema.TeeChart.Styles.Shape();
shpPyramid.Style = Steema.TeeChart.Styles.ShapeStyles.Pyramid;
shpPyramid.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Top;
shpPyramid.Add(dtSD, counter - dblScale, Color.Blue);
shpPyramid.Add(dtSDP1, counter + dblScale, Color.Blue);
shpPyramid.Color = Color.Blue;
shpPyramid.ShowInLegend = false;
wcFielding.Chart.Series.Add(shpPyramid);
The shapes should start at the date that I pass to them(dtSD) and extend 50 days past that date for the end point(dtSDP1).
Like I said, this code was all working in V2.x...Is there something I'm doing wrong in V3?

Thanks for your help.

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

Post by Narcís » Mon Apr 21, 2008 8:08 am

Hi SDO,

No that I know of. An issue with shape series (TF02012873) was fixed in the 4th April maintenance release but it doesn't seem to be the same as yours. Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either posty our files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

SDO
Newbie
Newbie
Posts: 9
Joined: Fri May 25, 2007 12:00 am
Contact:

Post by SDO » Mon Apr 21, 2008 5:01 pm

Hi,

Thanks for your response. I have uploaded the file via your upload page.

It won't run as it stands as it is database driven, but maybe you can see something in the code that isn't right.

Thank you for your help!

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

Post by Narcís » Tue Apr 22, 2008 9:52 am

Hi SDO,

Thanks for the code.

You could try populating shape series like this:

Code: Select all

shpPyramid.Color=Color.Blue;
shpPyramid.X0=dtSD;
shpPyramid.Y0=counter - dblScale;
shpPyramid.X1=dtSDP1;
shpPyramid.Y1=counter + dblScale;
If this doesn't help, could you please try reproducing the issue in a simple example as the one Christopher Ireland posted here?

Thanks in advance.
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

SDO
Newbie
Newbie
Posts: 9
Joined: Fri May 25, 2007 12:00 am
Contact:

Post by SDO » Tue Apr 22, 2008 8:56 pm

Hi,

Unfortunately, your previous example doesn't accept dates as inputs. I did try and converting the dates to doubles, but that didn't work either. I did notice a pattern while troubleshooting that I think might help this problem.

With my first example:

Code: Select all

Steema.TeeChart.Styles.Shape shpPyramid = new Steema.TeeChart.Styles.Shape(); 
shpPyramid.Style = Steema.TeeChart.Styles.ShapeStyles.Pyramid; 
shpPyramid.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Top; 
shpPyramid.Add(dtSD, counter - dblScale, Color.Blue); 
shpPyramid.Add(dtSDP1, counter + dblScale, Color.Blue); 
shpPyramid.Color = Color.Blue; 
shpPyramid.ShowInLegend = false; 
//old way on this line
wcFielding.Chart.Series.Add(shpPyramid);
... The shapes weren't displaying at all on the gantt chart. If I changed where I added the shape to the chart like this:

Code: Select all

//new way on this line
Steema.TeeChart.Styles.Shape shpPyramid = new Steema.TeeChart.Styles.Shape(wcFielding.Chart); 
shpPyramid.Style = Steema.TeeChart.Styles.ShapeStyles.Pyramid; 
shpPyramid.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Top; 
shpPyramid.Add(dtSD, counter - dblScale, Color.Blue); 
shpPyramid.Add(dtSDP1, counter + dblScale, Color.Blue); 
shpPyramid.Color = Color.Blue; 
shpPyramid.ShowInLegend = false; 
... The shape is added, but as a big vertical line down the left of the chart with a date of 12/1899, as 1899 is the earliest it can go. How can I do it this way and have it accept the date values that I provide it?

Thanks.

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

Post by Narcís » Wed Apr 23, 2008 9:06 am

Hi SDO,

You could try using ToOADate for converting DateTime values to double.

Code: Select all

shpPyramid.X0=dtSD.ToOADate();
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

SDO
Newbie
Newbie
Posts: 9
Joined: Fri May 25, 2007 12:00 am
Contact:

Post by SDO » Wed Apr 23, 2008 2:22 pm

Hi,

I tried that with the same results.

Any other suggestions?

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

Post by Narcís » Wed Apr 23, 2008 2:59 pm

Hi SDO,

Sorry but I don't have any other idea at the moment, it would be very helpful if you could send us a simple example project we can run "as-is" to reproduce the problem here. You could populate your series as in Christopher Ireland's project I pointed you.

Thanks in advance.
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

SDO
Newbie
Newbie
Posts: 9
Joined: Fri May 25, 2007 12:00 am
Contact:

Post by SDO » Wed Apr 23, 2008 3:02 pm

I'm doing so as I'm writing this. I will repost once I have it uploaded to you.

SDO
Newbie
Newbie
Posts: 9
Joined: Fri May 25, 2007 12:00 am
Contact:

Post by SDO » Wed Apr 23, 2008 9:02 pm

I have uploaded a web project via your upload page. It is a static representation of what I am trying to display. It is having all of the same issues as my other project, so it is a good base to work off of.

What should be happening is that all the shapes should be appearing on top of their respective gantt series.

Thanks and I will look forward to seeing what you find.

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

Post by Narcís » Thu Apr 24, 2008 9:39 am

Hi SDO,

Thanks for the example project. I could reproduce the issue here in v3 and added the defect (TF02013003) to our bug list to be fixed for next releases. Using latest v2 release I couldn't use Add method either, I had to populate shape series like this:

Code: Select all

				shpPyramid.X0 = dtSD.ToOADate();
				shpPyramid.Y0 = counter - dblScale;
				shpPyramid.X1 = dtSDP1.ToOADate();
				shpPyramid.Y1 = counter + dblScale;
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

SDO
Newbie
Newbie
Posts: 9
Joined: Fri May 25, 2007 12:00 am
Contact:

Post by SDO » Thu Apr 24, 2008 1:19 pm

Hi,

Thanks for the update. Since we need to get something working now, would your X,Y example work? I did give that a try before without success. Did you get it to work in my example?

Thanks for your help.

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 Apr 25, 2008 12:51 pm

Hi SDO,

We have just fixed the issue in v3 and now your code works as expected. Next TeeChart for .NET v3 maintenance release is expected to be out on early May.

In the meantime, a workaround is creating the series at designtime.
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

SDO
Newbie
Newbie
Posts: 9
Joined: Fri May 25, 2007 12:00 am
Contact:

Post by SDO » Fri Apr 25, 2008 8:46 pm

Hi Narcis,

Thanks for letting us know there is some light at the end of the tunnel. :D
Unfortunately, we can't produce the chart at designtime.
Since we did pay for the source, would there be a way we could get the fix before the maintenance release?

Thanks!

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

Post by Narcís » Mon Apr 28, 2008 9:00 am

Hi SDO,

Ok, I've just sent you current Shape.cs with the bug fix.
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