Polygon Plotting issues in webchart (.NET 2.0)

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
am
Newbie
Newbie
Posts: 11
Joined: Mon Feb 14, 2005 5:00 am

Polygon Plotting issues in webchart (.NET 2.0)

Post by am » Tue Sep 19, 2006 12:33 am

Hello,

I have this problem where I cannot plot a Polygon inside WebChart, Can anyone please let me know what I am doing wrong here, this is a simple example with the default.aspx having the following code, I can see a empty chart but no Polygon

public partial class _Default : System.Web.UI.Page
{
Steema.TeeChart.Chart tchart;
protected void Page_Load(object sender, EventArgs e)
{

tchart=WebChart1.Chart;
Steema.TeeChart.Styles.Map map1 = new Steema.TeeChart.Styles.Map(tchart);
Steema.TeeChart.Styles.Polygon P1 = new Steema.TeeChart.Styles.Polygon(tchart);
P1.Add(100.2, 100.2);
P1.Add(200.2, 200.2);
P1.Add(300.2, 300.3);
P1.Add(150.5, 150.5);
P1.Add(100.2, 100.2);
map1.Shapes.Add(P1);
P1.ParentSeries = map1;
}
}

Also I am successfully using AddShape method in map series to draw polygons, but the limitation for AddShape method is it takes only integer values. I am trying to use Polygon series so that I can use floating point co-ordinates.

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 » Tue Sep 19, 2006 10:19 am

Hi am,

You should use AddPolygon as in the example. You can also use AddPolygon with doubles ass the Add method used there also admits doubles,
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

am
Newbie
Newbie
Posts: 11
Joined: Mon Feb 14, 2005 5:00 am

Post by am » Tue Sep 19, 2006 4:18 pm

Hello,

Can you post a small snippet of the code ? Which example are you talking about ?

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 Sep 20, 2006 7:56 am

Hi am,

I thought you had already seen the example. It is the All Features\Welcome !\Chart styles\Extended\Map GIS example in the features demo, which is available at TeeChart's program group. The example already includes its sources.
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

wilcohsu
Newbie
Newbie
Posts: 40
Joined: Mon Dec 18, 2006 12:00 am

Post by wilcohsu » Sun Nov 25, 2007 8:47 am

Hello Narcis,

I try result is the same as am,but I use window form chart.
The Map GIS example is use z vale,you can try below code.
The shape only display integer value.

Steema.TeeChart.Styles.Map map1 = new Steema.TeeChart.Styles.Map(tchart);
Steema.TeeChart.Styles.Polygon P1 = new Steema.TeeChart.Styles.Polygon(tchart);
P1.Add(100.2, 100.2);
P1.Add(200.2, 200.2);
P1.Add(300.2, 300.3);
P1.Add(150.5, 150.5);
P1.Add(100.2, 100.2);
map1.Shapes.Add(P1);

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 Nov 26, 2007 10:25 am

Hi wilcohsu

Have you tried the suggestion I made in my first reply to this thread? Does it work fine for 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

wilcohsu
Newbie
Newbie
Posts: 40
Joined: Mon Dec 18, 2006 12:00 am

Post by wilcohsu » Wed Nov 28, 2007 12:56 am

Hi,

That is not precise.
I think that will use integate value to replace double value.
Does it right?

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 Nov 28, 2007 8:06 am

Hi wilcohsu,

Yes, there's no problem on doing this.
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