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
Polygon Plotting issues in webchart (.NET 2.0)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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,
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
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);
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);
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi wilcohsu,
Yes, there's no problem on doing this.
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 |
Instructions - How to post in this forum |